-
-
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
Version 6.2.0 consumes a lot of CPU and memory resources #96
Comments
Please fill out all the info in the bug report template. Without a minimal example document and your configuration (i.e., settings starting with |
I can't send you my private documents. Though I can debug your code, if you give me a direction. |
A minimal example document is not the original document for which the bug occurs, but a small example document (for which the bug still occurs, of course)--usually just a few lines with some dummy text. As it says in the docs: try to delete some parts of your document and see if the bug still occurs. In addition, try to delete some parts of your configuration and see if the bug still occurs. Post both minimized document and config here. Regarding debugging, the issue could be anywhere right now in either vscode-ltex or ltex-ls or both (see https://valentjn.github.io/vscode-ltex/docs/contributing-code-issues.html#how-to-contribute-code). If I knew where to look, I'd do it myself, but without a minimal example document and the LTEX configuration, I won't be able to help. This info is pretty much essential. |
It's the end of the term and I don't have time to experiment with documents. Maybe later. Can I just somehow connect with a debugger to the jvm and get information which class generates the CPU cycles? Or profile it? Java is not exactly my domain. |
People in #29 used VisualVM to profile a similar issue. However, it seems that as in #29, your problem is that the document is checked over and over again. Therefore, I assume a profiler won't be of much use--you'll just be seeing all the time wasted in LanguageTool. To find out why the checking happens, I think you'll need to debug. Although debugging Java bytecode is possible (I don't know anything about it though), debugging the source will resolve the issue faster. Without the additional info, I'm not sure if anyone here can help you. |
I read #29. It seems like the problem could be the same as described there: a whole recheck of the document is triggered on every keystroke. Then the rechecks stack up. I can see it in JSON logs. The client sends
on every keystroke with |
Yes. That's what I suspected, but that doesn't really help me. We need the requested info. The resolution of #29 was also delayed for a long time, because that info was missing. If minimal example document and minimal settings are not provided, this will be closed as stale after 7 days per the contribution guidelines. |
I merely shared my observation.
Oh, wow. So the attitude is you are making me a favor? Closing it right now, then. I was trying to help. Gosh, I was going even to debug for these guys. |
It's starts ok, but as soon as I start typing, it consumes 100% of one of the CPU cores and 5GB of memory, the laptop becomes very noisy.
I see the following process occupies the resources:
/usr/bin/java -Xms64m -Xmx512m -classpath /home/user/.vscode/extensions/valentjn.vscode-ltex-6.2.0/lib/ltex-ls-6.2.0/etc:/home/user/.vscode/extensions/valentjn.vscode-ltex-6.2.0/lib/ltex-ls-6.2.0/lib/ltexls-languagetool-patch-6.2.0.jar:/home/user/.vscode/extensions/valentjn.vscode-ltex-6.2.0/lib/ltex-ls-6.2.0/lib/* -Dapp.name=ltex-ls -Dapp.pid=21075 -Dapp.repo=/home/user/.vscode/extensions/valentjn.vscode-ltex-6.2.0/lib/ltex-ls-6.2.0/lib -Dapp.home=/home/user/.vscode/extensions/valentjn.vscode-ltex-6.2.0/lib/ltex-ls-6.2.0 -Dbasedir=/home/user/.vscode/extensions/valentjn.vscode-ltex-6.2.0/lib/ltex-ls-6.2.0 LtexLanguageServerLauncher
I set
"ltex.trace.server": "verbose"
, the language server output generates the following text every second over and over:The language client output window is flooded with
They come with 1 second interval as well. Each 'textDocument/publishDiagnostics' occupies 5000 lines of JSON.
The text was updated successfully, but these errors were encountered: