-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
High CPU usage caused by java platform se binary #29
Comments
@zwwi When does the high CPU usage occur? When you're opening a new document? When you type something in an open document? Or without doing anything? It would help a lot if you could attach an example document for which this occurs, or any additional information that helps me reproduce the issue. LT is known to be CPU-demanding when checking, but it shouldn't do anything when not checking. |
@valentjn Sorry for the lack of enough information. I checked more carefully, and find this happens when the cursor is hovering over the identified issue and LTeX is checking for quick fixes. Each check normally takes a few second. So you mean this is known, I will then close this issue. Thank you for your quick response. |
@konstantin-schekotihin Thanks for the profiling. Everything inside To help narrowing it down a little, could you post as much useful info from https://github.com/valentjn/vscode-ltex/blob/master/.github/ISSUE_TEMPLATE/bug-report.md as possible, especially the LTEX configuration in your |
Hi Julian, Thanks for the fast reply and your work! Best, |
@deividrvale As it's working for me1, precise steps to reproduce it would help a lot. On a vanilla VS Code installation, what do you have to do in order for the issue to appear? This should include all the steps, including extensions to install, text to type/documents to open, where to hover, etc. 1 I open a long document, wait one minute or so, then the LT diagnostics appear; hovering diagnostics then take 0.5s for the Quick Fix... link to appear in the popup. |
@valentjn I've tested the extension on others documents and projects of mine and it worked wonderfully. My visual studio is now the vanilla with only extensions being Latex-workshop, vscode-icons, LTex, and LTex English. I noticed something new though, this problem seems to happens only when I ignore some rule using the option Ignore rule in this sentence. The ignored rules goes to the file "settings.json" inside the workspace folder ".vscode". When I delete this folder close the file tab and open it again the "Checking for quick fixes..." is almost instantaneous again. As I ignore more rules it takes longer for the "Checking for quick fixes..." add the recommended action/quick fixes. With the same problems to the CPU usage. When you have enough rules in this file it takes a real-long time to analyze the file. For now on I am ignoring rules by just not doing anything instead of adding them to the ignored list. Please, let me know if this also happens with you, and I must say: thank you for all your work on this extension. Edit: |
Would just like to add that I've been seeing something similar to this pretty regularly, I had one "ignore rule in this sentence" entry in my settings.json. I just removed it and restarted VSCode. CPU usage has dropped to basically 0% (before it was sitting at ~14% from just the java process) and the Quick-Fix option now appears instantly instead of after several seconds or never. |
Thanks people for the input. I can confirm there was indeed a bug. For the background: LT has a cache which contains a list of the recently checked sentences (all text is split into sentences by LT). With this cache, when you edit some sentence, LT doesn't have to check all the other unchanged sentences again, which saves a lot of time. If the setting |
Fix released in 4.9.1. |
okay I got it what is causing high cpu , thanks for confirming the issue. |
Describe the bug
This is not really a bug. But when I enabled the LTeX extension, there was a high cpu usage caused by java platform se binary.
I like this extension. Thank you for developing this, but the fan noise is a bit annoying...
Steps to reproduce
Steps to reproduce the behavior:
Use vs code + latex workshop, enable ltex, after a few minutes, there would be a high cpu usage.
Version information
List here the version information of the relevant software.
java -version
)java version "1.8.0_241"
The text was updated successfully, but these errors were encountered: