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
[validation] investigate highly increased memory consumption with new Java source reconciling #922
The goal here is to analyze what exactly is causing this memory spikes and fix that. From what I've seen so far, it looks like the language server process uses a lot of memory, but it seems like this memory usage is not permanently, but reduced when a GC kicks in.
changed the title [-][validations] investigate highly increased memory consumption with new Java source reconciling[/-][+][validation] investigate highly increased memory consumption with new Java source reconciling[/+]on Dec 11, 2022
I think in general this reconciling will take up memory. Parsing all sources in a project does take memory. The difference now is that it is batches of 50 sources at once and there is only one thread dedicated to project reconciling. Thus, I think memory usage peaks should be lower. This is in since 4.17.2
Activity
martinlippert commentedon Dec 9, 2022
I added a section to the user guide explaining the experimental nature of this and how to workaround this by deactivating the new Java source reconciling - to see if that makes a difference: https://github.com/spring-projects/sts4/wiki/Validations-And-Quick-Fixes#experimental-nature-of-this-new-feature-and-potential-side-effects
martinlippert commentedon Dec 9, 2022
The goal here is to analyze what exactly is causing this memory spikes and fix that. From what I've seen so far, it looks like the language server process uses a lot of memory, but it seems like this memory usage is not permanently, but reduced when a GC kicks in.
[-][validations] investigate highly increased memory consumption with new Java source reconciling[/-][+][validation] investigate highly increased memory consumption with new Java source reconciling[/+]jan-z commentedon Dec 19, 2022
The language server process (BootLanguageServerBootApp) also uses a lot of CPU.
For me it uses about four cpu minutes every time I save any Java file.
I had to disable Java source reconciling to make Eclipse usable again.
martinlippert commentedon Dec 19, 2022
As a summary of the things you can deactivate in order to avoid the high CPU usage and performance issues:
Go to
Preferences -> Language Servers -> Spring Language Servers -> Spring Boot Language Server, then:Start Language Server at startup...OpenRewrite-> deactivateReconciling of Java sourcesSpring Boot Version Validation, setEnablementtoOffIn addition to that, feel free to also try the latest CI builds:https://dist.springsource.com/snapshot/STS4/nightly-distributions.html. The latest builds already include a few early steps to improve the overall performance behavior again.
beatjost commentedon Jan 4, 2023
The Update 4.17.1 seems to solve the issue (also after undo the workaround). Thank you for the quick fix 👍
martinlippert commentedon Jan 4, 2023
Thanks @beatjost for letting us know, glad to hear this.
BoykoAlex commentedon Feb 9, 2023
I think in general this reconciling will take up memory. Parsing all sources in a project does take memory. The difference now is that it is batches of 50 sources at once and there is only one thread dedicated to project reconciling. Thus, I think memory usage peaks should be lower. This is in since 4.17.2