SonarLint is super slow
I'm using the new eclipse plugin SonarLint in a large Eclipse RCP project. It is extremely slow. Analyzing all plugin projects (over 310) lasts several hours. SonarLint creates a log for every project build, that looks like this:
Starting SonarLint ... Load global repositories (done from cache) | time=98ms ... Load plugins index (done from cache) | time=3ms ... Load project repositories (done) | time=3ms ... Load quality profiles (done from cache) | time=45ms ... Load active rules (done) | time=174ms ... Load server rules (done from cache) | time=13ms ... JavaClasspath initialization done: 74003 ms ...
As we can see, most of the time we are waiting for the java classpath initialization. It's getting even worse: This initialization is done after every save of one single java file!
Is there any way to speed this process up?
Removing the SonarLint for Eclipse Java Configuration Helper is not a solution : it will remove the integration of SonarLint with Java projects, meaning that the analysis won't have several important properties needed to make it accurate, such as the classpath.
You might be experiencing this problem: https://jira.sonarsource.com/browse/SONARJAVA-1818.
Here are some things to try if SonarLint is running slow:
If you still face performance problems, please let us know how you are using SonarLint so that we track down the problem. You can a open a topic in the SonarLint group.
I tried installing SonarLint eclipse plugin without the SonarLint for Eclipse Java Cofiguration Helper component and it solved the problem. I am using Eclipse_4.6.1 with SonarLint_2.2.1
After above fix:
...
JavaClasspath initialization done: 0 ms
...
JavaTestClasspath initialization done: 0 ms
...
Java Main Files AST scan done: 327 ms
...
Java Test Files AST scan done: 1 ms
链接地址: http://www.djcxy.com/p/31618.html
下一篇: SonarLint超级慢