Sonar analysis takes a long time

My sonar analysis is taking a long time. This initially took about 20-30 minutes. Later it increased to 1 hour +. Now after 5 months it takes as much as 5 hours. Can anyone suggest a reason and how to fix the same.

I am using sonarqube 4.4 with postgresql 9.3dB. Sonar db takes up almost 40 GB of space.

If you check my log below, you will notice that most of the time is spent on IndexProjectPostJob.

08:53:47.437 INFO  - Executing post-job class org.sonar.plugins.core.issue.notification.SendIssueNotificationsPostJob
08:53:48.687 INFO  - Executing post-job class org.sonar.plugins.core.batch.IndexProjectPostJob
12:56:24.924 INFO  - Executing post-job class org.sonar.plugins.dbcleaner.ProjectPurgePostJob
12:56:26.601 INFO  - -> Keep one snapshot per day between 2015-06-10 and 2015-07-07

      

+3


source to share


2 answers


If you have a lot of Junit / Integration tests that run every time sonar parses your code, it can take a long time to complete.



If so, perhaps you should move (some of) your tests (such as the one using the db) to a separate sonar project that you will only run from time to time. And only run your small and real unit tests.

0


source


You probably have a lot of pictures. Will you be able to remove them. Which version of SonarQube are you using?



Sincerely.

0


source







All Articles