SonarQube's variable scan speeds

Hello, i have an issue with SonarQube and it’s speed of scanning on different machines.

I’m using

  • SonarQube Community Edition Version 7.7 (build 23042)
  • PostgreSQL 11.3
  • SonarQube Scanner 3.3.0.1492

All of which are running in docker containers.
My process is

  • Running a scan every day on remote host, and commiting docker container’s filesystem layer to an image in repository.

  • Then, the images are pulled and separate scan is ran on other machine (locally), reusing the containers which were committed earlier (both database and server).

The issue is with scan speeds.
On daily-scan machine, scan speeds are very fast (first time was very slow, because the project is huge).
I thought i would achieve the same speeds on any host if i did a “snapshot” of docker container (server + db’s docker commit), but the results are far worst, scan is behaving as if it was the first time it scans the files (like the first time on daily-scan).
It’s interesting how project’s issues are retained in commited database, but scans are not sped up like on “daily” version (which lasts approx 10 minutes opposing to 4hrs “local” scan).

Is there any way i can achieve similar speeds in local and daily scan?
Maybe sonar is caching something locally implicitly?

I would really appreciate your insight on the issue.