Hi,
Welcome to the community and thanks for this report!
The first answer to this is always to improve the underlying system. Can you make sure your build agent has a beefy CPU and plenty of memory? Unfortunately, analysis for most languages in single-threaded, so the number of cores isn’t really significant at this point.
Also, can you provide a debug analysis log?
The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.
This guide will help you find them.
Thx,
Ann