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
Extension: vmware.vscode-spring-boot v2.1.2 and v2.2.0 (both affected)
Java: OpenJDK 21.0.11-tem (Temurin)
LS Config: -Xmx2g, G1GC, MaxMetaspaceSize=384m
Workspace: 26 sub-projects (multi-module Maven, ~15 Spring Boot modules)
Summary
The Spring Boot Language Server exhibits three distinct but compounding problems in large multi-module workspaces, resulting in sustained 500-900% CPU usage (8+ cores) and 1.5-4GB RSS:
1. CachedThreadPool Explosion During Initial Indexing
During SpringIndexerJava.initializeProject(), the LS uses a CachedThreadPool (pool-11, backed by SynchronousQueue) for parallel project scanning. With 26 projects, this pool creates 500+ threads (observed up to #536), each consuming 60-100 CPU-seconds. The threads are created faster than they complete, causing thread churn and massive context-switching overhead.
Observed: pool-11-thread-536, each thread 60-100s CPU, 136+ concurrent threads
2. CompositeASTVisitor NPE (JdtCodeActionHandler)
Repeated NullPointerException in CompositeASTVisitor.visit(QualifiedName) — the astVisitor is null when processing Java code actions. This occurs frequently during normal editing (observed 150+ times in logs), and may trigger cascading re-indexing as a fallback.
java.lang.NullPointerException: Cannot invoke "org.eclipse.jdt.core.dom.ASTVisitor.visit(
org.eclipse.jdt.core.dom.QualifiedName)" because "astVisitor" is null
at org.springframework.ide.vscode.boot.java.reconcilers.CompositeASTVisitor.visit(
CompositeASTVisitor.java:176)
3. SpringMetamodelIndex Full Traversal on Every UI Interaction
Every VSCode UI interaction (file tab switch, Spring Explorer refresh, document focus change) triggers SpringMetamodelIndex.getBeansOfDocument() → getNodesOfType() which traverses the entire Spring metamodel index for all 26 projects. In v2.2.0, JMoleculesStructureView.createTree() adds an additional traversal layer. This repeats every few minutes as the user navigates code.
The indexing burst creates 400+ G1 young regions (~400MB of short-lived objects). After business threads complete, G1 concurrent marking threads (G1 Conc#0/#1) run for 10-15 additional minutes at 38% CPU each, extending perceived spike duration.
Steps to Reproduce
Create a VSCode workspace with 15+ Spring Boot Maven modules
Open VSCode — observe initial CPU spike (300-700% for 20-40 min)
Open any Java file, wait for LS to settle
Switch to another Java file — observe repeated CPU spike (400-700%)
Environment
-Xmx2g, G1GC,MaxMetaspaceSize=384mSummary
The Spring Boot Language Server exhibits three distinct but compounding problems in large multi-module workspaces, resulting in sustained 500-900% CPU usage (8+ cores) and 1.5-4GB RSS:
1. CachedThreadPool Explosion During Initial Indexing
During
SpringIndexerJava.initializeProject(), the LS uses aCachedThreadPool(pool-11, backed bySynchronousQueue) for parallel project scanning. With 26 projects, this pool creates 500+ threads (observed up to #536), each consuming 60-100 CPU-seconds. The threads are created faster than they complete, causing thread churn and massive context-switching overhead.Observed: pool-11-thread-536, each thread 60-100s CPU, 136+ concurrent threads
2. CompositeASTVisitor NPE (JdtCodeActionHandler)
Repeated
NullPointerExceptioninCompositeASTVisitor.visit(QualifiedName)— theastVisitoris null when processing Java code actions. This occurs frequently during normal editing (observed 150+ times in logs), and may trigger cascading re-indexing as a fallback.3. SpringMetamodelIndex Full Traversal on Every UI Interaction
Every VSCode UI interaction (file tab switch, Spring Explorer refresh, document focus change) triggers
SpringMetamodelIndex.getBeansOfDocument()→getNodesOfType()which traverses the entire Spring metamodel index for all 26 projects. In v2.2.0,JMoleculesStructureView.createTree()adds an additional traversal layer. This repeats every few minutes as the user navigates code.Observed stack:
4. GC Tail Effect Amplifies Spike Duration
The indexing burst creates 400+ G1 young regions (~400MB of short-lived objects). After business threads complete, G1 concurrent marking threads (G1 Conc#0/#1) run for 10-15 additional minutes at 38% CPU each, extending perceived spike duration.
Steps to Reproduce
spring-boot-ls.logshows repeatedJdtCodeActionHandlerNPE errorsjcmd <pid> Thread.printshows pool-11 threads numbered Support in_parallel step in Concourse Language Server #300+Workaround
Disabling the Spring Boot extension (
vmware.vscode-spring-boot) eliminates the CPU spikes. JDT LS (redhat.java) remains functional for Java editing.Suggested Fix Areas
CompositeASTVisitor.visit()forastVisitorSpringMetamodelIndexquery results per document to avoid full re-traversalRelated (but different) Issues
BootDiagnosticSeverityProvider)