Javascript sensor taking too long at "Deploying the bridge server"

Hello. I’m using sonarcloud with self hosted Azure DevOps pipelines agents on Windows Server 2016 x64 and Sensor JavaScript/TypeScript analysis [javascript] is taking from 5 to 10 minutes at the step “Deploying the bridge server into C:\Windows\temp.sonartmp\bridge-bundle”

Any ideas how could I solve that?

Thanks

Hi,

Welcome to the community!

Could we have the full analysis log, copy/pasted in text form, please?

 
Thx,
Ann

Sure. Here it goes.

11.log (922.3 KB)

Thanks

1 Like

Hi,

Thanks. Nothing jumps out at me in your log (I didn’t honestly expect anything to, but I had to check). So I’ve flagged this for the language experts.

 
Ann

1 Like

Hello Thiago,
In this step, the scanner loads the JS analyzer, which is written mainly in JS. It is unpacking it and its dependencies which is a lot of files. It can sometimes be slow as it is in your case.
Could you somehow upgrade your environment resources like disk speed or RAM?

Best,
Ilia

Hello, Ilia.

Thanks for the answer. Is there any kind of configuration to keep the JS analyzer or its dependencies pre installed in the server or in local cache to avoid that behavior of loading and unpacking all the files everytime we run an analysis? It would save much time as we scan many pull requests from many projects a day.

Hello Thiago,

We currently have not configuration to cache the extracted files between scans. I can recommend upgrading your infrastructure to use an SSD for example.

We have already attempted to fix this issue by bundling all the JS files into 1, but it has proven difficult due to the usage of TS aliases and it being NodeJS, but the adoption of ES modules could provide a solution for this.

You can track this issue here: Avoid long unpacking of `eslint-bridge` on Windows during the Visual Studio SonarLint installation and update · Issue #3319 · SonarSource/SonarJS · GitHub