Loading rules takes forever (~3.5 minutes)

  • 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.properties files 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, or sonarlint.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.

Hello @madeckel-philips , welcome to Sonar community! :waving_hand:

Thanks a lot for reporting the issue. Would you be able to provide verbose logs and thread dumps to help us investigate please ?

Did you experience the same on previous versions of the plugin?

Thanks in advance,
Sophio

Hi Sophio! Thanks for the quick response. Please find attached the thread dumps as well as a verbose log output.

Thanks for your help.

log.txt (136.9 KB)

sonarlint-recording-2026-10-30T10-05-25-205Z.zip (38.5 KB)