-
Notifications
You must be signed in to change notification settings - Fork 411
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
Completion cache resets after file recompilation resulting in slow code completion #847
Comments
Can you tell if it's a regression or not? What's your project topology? Maven/Gradle? Number of modules? files per modules? number of dependencies? |
I can't tell whether it's a regression, since I'm using it for about one month. Project consists of 220 jar dependencies ( grepped all sources and calculated number of srcs cat .classpath | grep 'kind="src"' | awk '{print $3}' | sed -rne 's_path="(.+)".+_\1_p' > flds
cat flds | while read fl; do echo -n "$fl "; { find $fl -name '*.java' | wc -l ; }; done Most projects consist of about 10 source files, 10 projects about 100 files and one of more than thousand. |
PC specs: java language server eats 4.9 gigs of RAM java user settings: {
"java.completion.guessMethodArguments": true,
"java.completion.overwrite": false,
"java.decompiler.fernflower": {
"udv": true,
"ind": " "
},
"java.errors.incompleteClasspath.severity": "ignore",
"java.format.settings.profile": "GoogleStyle",
"java.format.settings.url": "/home/yan/.config/eclipse-java-style.xml",
"java.import.gradle.enabled": false,
"java.jdt.ls.vmargs": "-noverify -Xmx5G -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+CompactStrings",
"java.signatureHelp.enabled": true
} java workspace settings: {
"java.import.maven.enabled": false,
} |
How's the performance in Eclipse? |
Can you enable
|
do you have things like automatic save enabled? |
is that in just 1 project .classpath? |
Eclipse editing works fluent and instant, no matter how I edit. But the project was loading much longer (1-2 minutes I guess) |
yes |
I've noticed that when I reloaded vscode window and relauched server it became much faster (2-3 times). Still slower than eclipse and feels lagging. But initially it consumes 2.5 gigs of ram. After 1-2 days of usage it uses max available RAM (5 gigs). |
"files.autoSave": "off",
tried, didn't noticed any difference |
https://gist.github.com/Yanpas/6b174057dcc440991a2613b046436ee4
https://gist.github.com/Yanpas/229a5f22bae6f274661d4b36b96b9697 |
Nonverbose log when I made some edits, entered
|
can you disable all java extensions but the red hat one? |
Still the same. about 4 seconds it takes to execute textDocument/documentSymbol |
Finally I've pointed out the reason of lags. No matter how much edits you do to the current file and how often do you save it.
|
Thanks for the heads up, that's very useful information. @snjeza is currently looking at some performance improvements that might help here (or not) |
It also looks like closing files gets good performance back. I've made two profiling samples: 1 (one file opened) and M (about 12 files opened): |
@snjeza yeah, much better, I think it resolves this issue. |
@snjeza which changes are in your custom build? all of the pending PRs? |
I have large enough project (about 8000 java files). Code completion works fast if you do not edit a file, but if you do some edits you will wait for any kind of suggestion for several seconds. Typing code becomes a headache.
STR:
Screencast:

The text was updated successfully, but these errors were encountered: