Skip to content

[validation] investigate highly increased memory consumption with new Java source reconciling #922

Closed

Description

@martinlippert

We are seeing a highly increased memory consumption when having the new Java source code reconciling enabled (as reported by various users).

Activity

  1. added
    for: eclipse
    for: vscode
    on Dec 9, 2022
  2. added this to the 4.17.1.RELEASE milestone on Dec 9, 2022
  3. martinlippert commented on Dec 9, 2022

    @martinlippert
    MemberAuthor

    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

  4. martinlippert commented on Dec 9, 2022

    @martinlippert
    MemberAuthor

    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.

  5. 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
  6. jan-z commented on Dec 19, 2022

    @jan-z

    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.

  7. martinlippert commented on Dec 19, 2022

    @martinlippert
    MemberAuthor

    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:

    • Deactivate Start Language Server at startup...
    • OpenRewrite -> deactivate Reconciling of Java sources
    • Spring Boot Version Validation, set Enablementto Off

    In 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.

  8. beatjost commented on Jan 4, 2023

    @beatjost

    The Update 4.17.1 seems to solve the issue (also after undo the workaround). Thank you for the quick fix 👍

  9. martinlippert commented on Jan 4, 2023

    @martinlippert
    MemberAuthor

    Thanks @beatjost for letting us know, glad to hear this.

  10. BoykoAlex commented on Feb 9, 2023

    @BoykoAlex
    Contributor

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

for: eclipsefor: vscodetheme: performancetheme: validationtype: bug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions