You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[vscode] Spring Boot Tools slow down code complete #808
Thanks for reporting this @degbug. Slowing down typing speed or completion performance is an absolute no-go here. We need to investigate. Thanks for attaching the log output, that is a great starting point.
From what I can see, it looks like the slowdown happens sometimes, and sometimes it doesn't. Did you observe any special action or sequence of activities that triggers the slowdown?
Thanks for reporting this @degbug. Slowing down typing speed or completion performance is an absolute no-go here. We need to investigate. Thanks for attaching the log output, that is a great starting point.
From what I can see, it looks like the slowdown happens sometimes, and sometimes it doesn't. Did you observe any special action or sequence of activities that triggers the slowdown?
@martinlippert No, I didn't observed. When I first open the project and first typing is quickly, but then it become very easy to triggers the slowdown. But I don't know what cause this.
The log file contains many error log, this may affect this?
I'm having a similar issue with 4.15.2 on eclipse. I didn't have time to dig into it and create an issue/reproduction. I had to revert to 4.15.1 to get my work done.
11:19:21.762 [pool-3-thread-1] ERROR o.s.i.v.b.j.utils.SymbolCacheOnDisc - cannot write symbol cache
java.io.FileNotFoundException: /Users/degbug/.sts4/.symbolCache/degbug-auto-task-java--A71297B3246476FA87DEC5893F93A8BB.json (Too many open files)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(Unknown Source)
at java.base/java.io.FileOutputStream.<init>(Unknown Source)
at java.base/java.io.FileOutputStream.<init>(Unknown Source)
at java.base/java.io.FileWriter.<init>(Unknown Source)
at org.springframework.ide.vscode.boot.java.utils.SymbolCacheOnDisc.save(SymbolCacheOnDisc.java:259)
at org.springframework.ide.vscode.boot.java.utils.SymbolCacheOnDisc.update(SymbolCacheOnDisc.java:236)
at org.springframework.ide.vscode.boot.java.utils.SpringIndexerJava.scanFilesInternally(SpringIndexerJava.java:316)
at org.springframework.ide.vscode.boot.java.utils.SpringIndexerJava.scanAffectedFiles(SpringIndexerJava.java:347)
at org.springframework.ide.vscode.boot.java.utils.SpringIndexerJava.scanFiles(SpringIndexerJava.java:191)
at org.springframework.ide.vscode.boot.java.utils.SpringIndexerJava.updateFiles(SpringIndexerJava.java:145)
at org.springframework.ide.vscode.boot.app.SpringSymbolIndex.lambda$updateItems$28(SpringSymbolIndex.java:727)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
I tried this with the various versions. I can clearly reproduce the slowdown when using the latest release version 1.37.0, I can clearly see it running A LOT faster and more fluent with 1.36.0. The snapshot version 1.38.0-202208052243 seems to be a lot faster than 1.37.0 faster than your recording from above, but not quite at the 1.36.0 level.
The question is, why. The log indicate that the overall content-assist performance from the Spring Boot language server seems to be okay-ish and fast, so it doesn't look like the editor waits for the language server to return content-assist information.
Looks like some additional investigations are necessary here... We will continue with that...
When looking at what exactly the language server is doing, it looks to me like nothing is really blocking the code completion anymore, but too much other stuff is going on:
I've pushed d557c0d to turn off the Rewrite reconcile bits by default. Will wait for the build to go through, smoke test it and then provide a link to the build here
And this is the log of vscode-spring-boot-1.38.0-202208052243.vsix.
When I rollback to vscode-spring-boot-1.38.0-202208052243.vsix it become slowly. boot.log1.38_0805.txt
Activity
martinlippert commentedon Aug 5, 2022
Thanks for reporting this @degbug. Slowing down typing speed or completion performance is an absolute no-go here. We need to investigate. Thanks for attaching the log output, that is a great starting point.
From what I can see, it looks like the slowdown happens sometimes, and sometimes it doesn't. Did you observe any special action or sequence of activities that triggers the slowdown?
degbug commentedon Aug 5, 2022
@martinlippert No, I didn't observed. When I first open the project and first typing is quickly, but then it become very easy to triggers the slowdown. But I don't know what cause this.
The log file contains many error log, this may affect this?
youngm commentedon Aug 5, 2022
I'm having a similar issue with 4.15.2 on eclipse. I didn't have time to dig into it and create an issue/reproduction. I had to revert to 4.15.1 to get my work done.
BoykoAlex commentedon Aug 6, 2022
@degbug please try this vsix and let us know if this works better for you: https://s3.us-west-1.amazonaws.com/s3-test.spring.io/sts4/vscode-extensions/snapshots/vscode-spring-boot-1.38.0-202208052243.vsix
@youngm please try upgrading STS eclipse from the snapshot update site. Should be good to update on Monday. Curious if it works any better: https://dist.springsource.com/snapshot/TOOLS/sts4/nightly/e4.24
degbug commentedon Aug 6, 2022
@BoykoAlex I have try vscode-spring-boot-1.38.0-202208052243.vsix, It works better than before. but still work slow than disable the vscode-spring-boot extensions.
this is the log file:
boot.log6.txt
And I saw error in log:
4 remaining items
martinlippert commentedon Aug 8, 2022
Quick update:
I tried this with the various versions. I can clearly reproduce the slowdown when using the latest release version
1.37.0, I can clearly see it running A LOT faster and more fluent with1.36.0. The snapshot version1.38.0-202208052243seems to be a lot faster than1.37.0faster than your recording from above, but not quite at the1.36.0level.The question is, why. The log indicate that the overall content-assist performance from the Spring Boot language server seems to be okay-ish and fast, so it doesn't look like the editor waits for the language server to return content-assist information.
Looks like some additional investigations are necessary here... We will continue with that...
martinlippert commentedon Aug 8, 2022
When looking at what exactly the language server is doing, it looks to me like nothing is really blocking the code completion anymore, but too much other stuff is going on:
thread-dump-while-busy.txt
BoykoAlex commentedon Aug 8, 2022
I've pushed d557c0d to turn off the Rewrite reconcile bits by default. Will wait for the build to go through, smoke test it and then provide a link to the build here
BoykoAlex commentedon Aug 9, 2022
@degbug Here is the new build to try: https://dist.springsource.com/snapshot/STS4/nightly-distributions.html At the bottom of the page please download vscode-spring-boot vsix file. I hope typing will become the same as before. If this is the case wonder if you could find in Preferences -> Settings then under Extensions -> Boot-Java Config find the setting
Boot-java › Rewrite: Reconcile(should be unchecked by default) check mark and try typing again just like before. Do you see much difference?degbug commentedon Aug 10, 2022
@BoykoAlex
I tried vscode-spring-boot-1.38.0-202208091607.vsix and feel it faster than vscode-spring-boot-1.38.0-202208052243.vsix。 And feel like 1.36.
But no matter I enable or disable the Rewrite: Reconcile option. I feel it behavior is same.
This is the log first install the vscode-spring-boot-1.38.0-202208091607.vsix
boot.log1.38.nightly_open_and_close.txt
And I notice that when I enable the Rewrite: Reconcile option, the log can not output.
When I reopen the project it appear.
this is the log after I reopen project:
boot.log1.38.nightly_close.txt
And this is the log of vscode-spring-boot-1.38.0-202208052243.vsix.
When I rollback to vscode-spring-boot-1.38.0-202208052243.vsix it become slowly.
boot.log1.38_0805.txt
BoykoAlex commentedon Aug 10, 2022
Thanks very much for trying the build out :-) Sounded like https://s3-us-west-1.amazonaws.com/s3-test.spring.io/sts4/vscode-extensions/snapshots/vscode-spring-boot-1.38.0-202208091607.vsix worked just like 1.36 and in both cases: rewrite reconcile off and on. If this is correct I suppose we should get to start releasing STS4 with the fix we've put in.
youngm commentedon Aug 10, 2022
FWIW, I tried out the latest nightly in eclipse and the slowness I was experiencing appears to be fixed as well.
martinlippert commentedon Aug 10, 2022
@youngm Thanks for trying this and letting us know, very very much appreciated. The maintenance release 4.15.3 should go live tomorrow (most likely).