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
indexing cost too long time (40min+) Only occurs in the VS Code - Insiders #4277
We have four tasks blocked waiting for the index to build, and it’s extremely slow because it’s only running on one thread. How can we make this process run in parallel?
Hey, can we make the indexing run with 4 parallel workers? They shouldn’t block each other. By the way, I noticed VS Code Insiders keeps rebuilding the index on every startup.
@mozhuanzuojing please enable verbose tracing ("java.trace.server":"verbose"), restart the extension and attach the logs from the Language Support for Java output view. There might be some specific config that triggers the reindexing on restart.
I know my computer’s performance is a bit weak, but here’s the real situation with the indexing: one core is on the job, while the other five are just… well, being bystanders.
@mozhuanzuojing please enable verbose tracing ("java.trace.server":"verbose"), restart the extension and attach the logs from the Language Support for Java output view. There might be some specific config that triggers the reindexing on restart.
@fbricon Quick heads-up: I’ll provide the logs later today. The indexing just finished, so I need to capitalize on this and work for a couple of hours.
Could you try to disable Gradle for Java and update Test Runner for Java to 0.43.2?
@snjeza Right now, the latest version of Test Runner for Java hasn't been pushed to the plugin marketplace yet. I'll test it tomorrow morning at 9 AM (that's in about 10 hours).
0.43.2 is the latest Test Runner for Java release available on the marketplace. It's more recent than the months old pre-release version you're using. Microsoft is working on a new pre-release but we have no ETA when they'll release it. So you should definitely switch.
0.43.2 is the latest release available on the marketplace. It's more recent than the months old pre-release version you're using. Microsoft is working on a new pre-release but we have no ETA when they'll release it. So you should definitely switch.Test Runner for Java
@fbricon I see. I'll switch to the official version in a moment.
I suspect that the Java index building in the vscode-insiders version is incomplete.
The following screenshot is from my company's computer, where the environment is essentially identical. With approximately 20,000 source code files and about 50,000 JARs scanned for indexing (including duplicates), cleaning and rebuilding the entire workspace takes only 5 minutes. All extension configurations are set to the preview version. in wsl2.
changed the title [-]indexing cost too long time (40min+)[/-][+]indexing cost too long time (40min+) **Only occurs in the `VS Code - Insiders`**[/+]on Dec 15, 2025
changed the title [-]indexing cost too long time (40min+) **Only occurs in the `VS Code - Insiders`**[/-][+]indexing cost too long time (40min+) Only occurs in the `VS Code - Insiders`[/+]on Dec 15, 2025
@fbricon@snjeza Upon comparison today, we found that the issue of the index-building process taking too long occurs only in VS Code Insiders (Preview).
Activity
[-]indexing cost too long time (10min+)[/-][+]indexing cost too long time (20min+)[/+]mozhuanzuojing commentedon Dec 1, 2025
Hey, can we make the indexing run with 4 parallel workers? They shouldn’t block each other. By the way, I noticed VS Code Insiders keeps rebuilding the index on every startup.
fbricon commentedon Dec 1, 2025
@snjeza could you please investigate?
fbricon commentedon Dec 1, 2025
@mozhuanzuojing please enable verbose tracing (
"java.trace.server":"verbose"), restart the extension and attach the logs from theLanguage Support for Javaoutput view. There might be some specific config that triggers the reindexing on restart.mozhuanzuojing commentedon Dec 1, 2025
mozhuanzuojing commentedon Dec 1, 2025
@fbricon Quick heads-up: I’ll provide the logs later today. The indexing just finished, so I need to capitalize on this and work for a couple of hours.
mozhuanzuojing commentedon Dec 2, 2025
@fbricon log file : .log
mozhuanzuojing commentedon Dec 2, 2025
@fbricon client log files:
client.log.2025-12-02.log
client.log.2025-12-02.1.log
client.log.2025-12-02.2.log
client.log.2025-12-02.3.log
mozhuanzuojing commentedon Dec 2, 2025
log files for second start after close window.
.log
client.log.2025-12-02.3.log
client.log.2025-12-02.4.log
client.log.2025-12-02.5.log
client.log.2025-12-02.6.log
mozhuanzuojing commentedon Dec 2, 2025
vscode-insiders settings.json
windows settings.json
{ "git.autofetch": true, "files.autoGuessEncoding": true, "git.confirmSync": false, "workbench.iconTheme": "material-icon-theme", "[vue]": { "editor.defaultFormatter": "Vue.volar" }, "vue.format.wrapAttributes":"force-expand-multiline", // 关闭debug前强制编译 "java.debug.settings.forceBuildBeforeLaunch": false, "extensions.ignoreRecommendations": true, "Codegeex.License": "", "Codegeex.Privacy": true, "[javascript]": { "editor.defaultFormatter": "vscode.typescript-language-features" }, "[jsonc]": { "editor.defaultFormatter": "vscode.json-language-features" }, "javascript.updateImportsOnFileMove.enabled": "always", "[json]": { "editor.defaultFormatter": "vscode.json-language-features" }, "files.associations": { "*.json": "jsonc" }, "roo-cline.allowedCommands": [ "git log", "git diff", "git show", "npm test", "npm install", "tsc" ], "terminal.integrated.defaultProfile.windows": "PowerShell", "terminal.integrated.defaultProfile.linux": "bash", "security.workspace.trust.untrustedFiles": "open", "remote.SSH.remotePlatform": { "49.232.172.112": "linux" }, "roo-cline.deniedCommands": [], "redhat.telemetry.enabled": true, "files.exclude": { "**/.git": true, "**/target": false, "**/.svn": true, "**/.hg": true, "**/CVS": true, "**/.DS_Store": true, "**/Thumbs.db": true }, "search.exclude": { "**/target": true, "**/node_modules": true, "**/bower_components": true, "**/*.code-search": true }, "java.jdt.ls.vmargs": "-Dsun.jnu.encoding=utf8 -Dfile.encoding=utf8 -Xms1g -Xmx5g", "java.configuration.runtimes": [ { "name": "JavaSE-1.8", "path": "C:/Program Files/Eclipse Adoptium/jdk-8.0.382.5-hotspot", }, { "name": "JavaSE-17", "path": "C:/Program Files/Eclipse Adoptium/jdk-17.0.11.9-hotspot" }, { "name": "JavaSE-25", "path": "C:/Program Files/Eclipse Adoptium/jdk-25.0.1.8-hotspot", "default": true } ], "java.configuration.maven.userSettings": "E:/java/apache-maven-3.9.9/conf/settings.xml", "maven.pomfile.autoUpdateEffectivePOM": true, "maven.terminal.customEnv": [ { "environmentVariable": "MAVEN_OPTS", "value": " -DarchetypeCatalog=internal -Dfile.encoding=utf8 -Dsun.jnu.encoding=utf8 " } ], "maven.terminal.useJavaHome": true, "maven.executable.path": "F:/java/apache-maven-3.9.9/bin/mvn.cmd", "java.settings.url": "file:///C:/Users/l/AppData/Roaming/Code/User/relax.org.eclipse.jdt.core.prefs", "explorer.autoReveal": false, "explorer.fileNesting.expand": false, // 仅格式化修改行(通过git对比) "editor.formatOnSaveMode": "modificationsIfAvailable", "editor.stickyScroll.enabled": true, "debug.console.acceptSuggestionOnEnter": "on", "debug.openExplorerOnEnd": true, "java.debug.settings.hotCodeReplace": "auto", "java.completion.maxResults": 36, "java.completion.chain.enabled": true, "java.completion.matchCase": "off", "java.completion.guessMethodArguments": "insertBestGuessedArguments", "java.referencesCodeLens.enabled": true, "java.implementationCodeLens": "all", "java.symbols.includeSourceMethodDeclarations": true, "java.maven.downloadSources": true, "java.eclipse.downloadSources": true, "editor.lightbulb.enabled": "on", "git.replaceTagsWhenPull": true, "java.trace.server": "verbose", "svelte.enable-ts-plugin": true, "java.gradle.buildServer.enabled": "on", "javascript.referencesCodeLens.enabled": true, "javascript.referencesCodeLens.showOnAllFunctions": true, "typescript.referencesCodeLens.enabled": true, "typescript.referencesCodeLens.showOnAllFunctions": true, "diffEditor.codeLens": true, "gitlens.codeLens.includeSingleLineSymbols": true, "typescript.implementationsCodeLens.enabled": true, "typescript.implementationsCodeLens.showOnInterfaceMethods": true, "xml.codeLens.enabled": true, "boot-java.highlight-copilot-codelens.on": true, "javascript.preferGoToSourceDefinition": true, "typescript.preferGoToSourceDefinition": true, // 文件分隔符 "editor.wordSeparators": "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?,。?:;“”【】!", "remote.autoForwardPortsSource": "hybrid", "gradle.allowParallelRun": true, "typescript.updateImportsOnFileMove.enabled": "always", // 关闭引用定义 "java.references.includeDeclarations": false, "[typescript]": { "editor.defaultFormatter": "vscode.typescript-language-features" }, "workbench.colorTheme": "Default Dark+", "security.allowedUNCHosts": [ "wsl.localhost" ], "diffEditor.hideUnchangedRegions.enabled": true, "java.maxConcurrentBuilds": 4, }wsl2 settings.json
{ "git.repositoryScanMaxDepth": 3, "java.configuration.runtimes": [ { "name": "JavaSE-1.8", "path": "/usr/lib64/jvm/jdk8" }, { "name": "JavaSE-17", "path": "/usr/lib64/jvm/jdk17" }, { "name": "JavaSE-25", "path": "/usr/lib64/jvm/jdk25", "default": true } ], "java.jdt.ls.vmargs": "-Dsun.jnu.encoding=gb2312 -Dfile.encoding=gb2312 -Xms2g -Xmx5g -XX:+UseStringDeduplication -XX:GCTimeRatio=9 -XX:AdaptiveSizePolicyWeight=90 ", // java格式化 "java.format.settings.url": "/usr/local/java/config/vscode-java-google-style.xml", // JDT编译器诊断 -- strict "java.settings.url": "/usr/local/java/config/strict.org.eclipse.jdt.core.prefs", "java.completion.chain.enabled": true, "java.completion.matchCase": "off", "java.completion.guessMethodArguments": "insertBestGuessedArguments", "java.debug.settings.hotCodeReplace": "auto", "debug.console.acceptSuggestionOnEnter": "on", "debug.openExplorerOnEnd": true, // 关闭调试显示行内值 "debug.inlineValues": "off", // 内部停用gradleServer "java.gradle.buildServer.enabled": "off", "java.referencesCodeLens.enabled": true, "java.implementationCodeLens": "all", "java.symbols.includeSourceMethodDeclarations": true, // "java.cleanup.actions": [ // "redundantModifiers", // "redundantIfCondition", // "redundantComparisonStatement", // "lambdaExpressionFromAnonymousClass", // "organizeImports", // "addOverride", // "tryWithResource", // "switchExpression", // "lambdaExpression", // "instanceofPatternMatch" // ], // 左侧树的目录固定在顶部 "workbench.tree.enableStickyScroll": true, // 编辑器里的函数固定在顶部 "editor.stickyScroll.enabled": true, "java.maven.downloadSources": true, "java.eclipse.downloadSources": true, // 自动展开调试变量值 "debug.autoExpandLazyVariables": "on", // 并行运行 "gradle.allowParallelRun": true, // 关闭debug前强制编译 "java.debug.settings.forceBuildBeforeLaunch": false, "java.maxConcurrentBuilds": 4, "java.saveActions.organizeImports": true, "editor.codeActionsOnSave": { "source.organizeImports": "explicit" }, "java.trace.server": "verbose" }mozhuanzuojing commentedon Dec 2, 2025
/usr/local/java/config/strict.org.eclipse.jdt.core.prefs
mozhuanzuojing commentedon Dec 2, 2025
7 remaining items
snjeza commentedon Dec 2, 2025
@mozhuanzuojing Could you try to disable
Gradle for Javaand updateTest Runner for Javato 0.43.2?mozhuanzuojing commentedon Dec 2, 2025
@snjeza Right now, the latest version of Test Runner for Java hasn't been pushed to the plugin marketplace yet. I'll test it tomorrow morning at 9 AM (that's in about 10 hours).
fbricon commentedon Dec 2, 2025
0.43.2 is the latest
Test Runner for Javarelease available on the marketplace. It's more recent than the months old pre-release version you're using. Microsoft is working on a new pre-release but we have no ETA when they'll release it. So you should definitely switch.mozhuanzuojing commentedon Dec 2, 2025
@fbricon I see. I'll switch to the official version in a moment.
mozhuanzuojing commentedon Dec 2, 2025
@snjeza @fbricon This is the result of the recent test.
mozhuanzuojing commentedon Dec 2, 2025
@fbricon @snjeza It seems to have some effect. The indexing task now finishes in about 5-6 minutes.
mozhuanzuojing commentedon Dec 10, 2025
I suspect that the Java index building in the
vscode-insidersversion is incomplete.mozhuanzuojing commentedon Dec 10, 2025
Comparative Analysis of the Two Environments
[-]indexing cost too long time (20min+)[/-][+]indexing cost too long time (40min+)[/+][-]indexing cost too long time (40min+)[/-][+]indexing cost too long time (40min+) **Only occurs in the `VS Code - Insiders`**[/+][-]indexing cost too long time (40min+) **Only occurs in the `VS Code - Insiders`**[/-][+]indexing cost too long time (40min+) Only occurs in the `VS Code - Insiders`[/+]mozhuanzuojing commentedon Dec 15, 2025
@fbricon @snjeza Upon comparison today, we found that the issue of the index-building process taking too long occurs only in VS Code Insiders (Preview).
fbricon commentedon Dec 17, 2025
can you try setting
"java.sharedIndexes.enabled":"off", as it's automatically enabled in vscode insiders.You can also change the index location, see if a fresh index would help (when sharedIndexes are enabled).
mozhuanzuojing commentedon Dec 18, 2025
@fbricon Thanks a lot. After disabling the shared index, everything is working normally now.
@fbricon Changing the index location had no effect on the slow index build speed.