C# analyse with exlusion does not speed up the process

Exclude some folders with sonar.exclusions does not speed up the analysis.
There are some warning about excluded files in the analysis log (there is a big old csharp part that is excluded BUT still compiled), so even if the exclusion works from sonar (this files does not appear in Sonar) they seems to be analyzed, that is quite time consuming.

The analyse took less than 5 minutes before (when these cs projects were not included it the compilation) BUT takes now more than 10 minutes… even with exclusion. So the analyse becomes very long on the build process, for no additional output.
Note that compiling this old csharp takes less than 1 minute of additional time, BUT the analysis takes 6 minutes more.

Is it possible to speed up the analyse by ignoring completly the exclusion?

Regards

Hey there.

In the context of C# analysis, sonar.exclusions don’t speed up the analysis. That’s because all the ‘real’ analysis is happening during the build, and exclusions just weed out the results later. We did some proofs-of-concept around addressing this, and they didn’t have a big impact of the analysis time.

There are two items on our roadmap around .NET analysis performance which are coming soon.

You can also check out this performance guide: