0

I noticed when scanning a project that the first background task do not take so long compared to the following ones. Can someone explain why ? is it due to some comparison ? In our workflow we are willing to use the sonar for bitbucket plugin (https://marketplace.atlassian.com/apps/1212735/sonar-for-bitbucket-server) which means that we are going to make a sonar scan for each build of a feature branch. It will be interesting if the background task will take always 3 minutes instead of 20min and sometime more. Why is there a difference between the firt background task and the others ones ? Is there a way to do some cleaning before sonar background task begin so that it will be faster (we don't care for sonar history in features branches) ?

Regards,

gbenmansour
  • 85
  • 1
  • 7
  • 1
    Check if your system is equivalent with the hardware requirements stated on the [requirements](https://docs.sonarqube.org/display/SONAR/Requirements) page. – Jeroen Heier Aug 03 '18 at 16:39
  • yes the requirements are met and that does not avoid the fact that there is always a difference of time execution between the first background task and the following ones. – gbenmansour Aug 06 '18 at 10:11
  • The background task will use the stored project records in order to compare the difference. See also the [Fixing the Water Leak](https://docs.sonarqube.org/display/SONAR/Fixing+the+Water+Leak) documentation. – Jeroen Heier Aug 06 '18 at 14:41
  • @JeroenHeier thanks that explain the difference in time processing (no comparison for the first task). Can you tell what is the best method to use to delete stored records of previous analysis, so that the analysis will act as if it is the first one (like I said in my case I do not need analysis history for feature branch). – gbenmansour Aug 06 '18 at 15:38
  • See [this](https://stackoverflow.com/questions/38221149/automatically-remove-sonarqube-branch-projects-when-git-branch-merged-removed) SO discussion. – Jeroen Heier Aug 06 '18 at 15:49

0 Answers0