I am using SonarQube Server 10.7 (Community Edition). My project is an Angular project. The scan time is too high. Please suggest how can I optimize scan time. I already have 40 GB RAM available on server so infra wise there is no issue.
Can Incremental analysis help me. If yes please suggest how can I configure it. Or please suggest any other way to reduce scan time.
It really depends on what is taking up analysis time. I suggest providing your scanner logs with DEBUG log (sonar-scanner -X, or adding sonar.verbose=true`)
Hi Colin, Thanks for your response. Please find the Log below. Here is the line taking too much time. This is creating a folder .sonartmp of 90 MB every time.
13:47:49 03:17:49.330 INFO Sensor JavaScript/TypeScript analysis [javascript]
Deploying the bridge server into C:\Users\Administrator\Desktop\Angular.scannerwork.sonartmp\bridge-bundle
It looks like this is the only bit that’s taking a long time.
06:04:09.040 INFO Sensor JavaScript/TypeScript analysis [javascript]
06:04:09.040 DEBUG Deploying the bridge server into C:\Users\Administrator\Desktop\Angular\.scannerwork\.sonartmp\bridge-bundle
06:13:40.400 INFO Detected os: Windows Server 2019 arch: amd64 alpine: false. Platform: WIN_X64
06:13:40.400 DEBUG Currently installed Node.js version: v20.9.0. Available version in analyzer: v20.9.0
Do you have something like Windows Defender or another AV program running? This can often drastically slow down the time it takes to unpack/deploy the bridge server. The best case scenario is putting this folder .scannerwork or .sonartmp into an allow list.
However, I believe that this problem might have gotten incidentally fixed while solving an issue for SonarQube for IDE (JS-396). This fix is available in the latest version of Community Build, v25.1. Upgrade and try it out!