- Operating system: VSCode@Win11, connected to Linux remote Host via SSH
- SonarQube for VS Code plugin version: v6.2.0
- Programming language you’re coding in: C++
- Is connected mode used: NO
We experience an abnormally long loading time for the rules until the Sonar extension is ready and usable. Copilot is suspecting from the log output that the extension is scanning the whole repository including the git-ignored files (like build folder). This is suspected to be the reason for the long loading time.
Here is a Claude analysis of the problem:
Timeline from your log
Time Gap What happened 54:28.0 → 54:31.9 ~4 s JVM starts, 13 analyzer plugins load, and the root scope becomes ready. 54:37 → 55:30 53 s Mostly idle. The background telemetry task then extracts rule metadata in about 2 s. 54:31.9 → 58:03.4 ≈3.5 min Nothing is logged by the server. 58:03.675 → 58:03.682 7 ms All 92 sonar-project.propertiesfiles are processed.58:03.9 → 58:04.9 ~1 s Rules load and the first analysis runs: 865 JS/TS checks, Java checks, etc.
The properties files only provide binding hints for suggesting a Connected Mode project. Their size doesn’t affect startup.
What causes the 3.5-minute gap
In the 6.x extension source, the language server asks the extension to list the folder’s files. The request handler waits for
crawlDirectory()to finish before it responds, and folder setup continues only after that.The crawl:
- reads one directory at a time;
- skips only
.sonarlint,.git,node_modules, and.DS_Store;- does not use
.gitignore,files.exclude, orsonarlint.analysisExcludesStandalone.In this checkout, that means about 25,200 directories and 101,600 files. About 20,000 of those directories are in
build_native/. Git tracks only about 4,300 directories.