Latest
Sonar 1 min read

Find Out Why a SonarQube Scan Is Slow

Find Out Why a SonarQube Scan Is Slow
Sonar · October 29, 2026

Version note: references describe SonarQube Server 2025.2 behaviour. Check your server, scanner and edition requirements. These examples were not run against a live SonarQube server.

What this guide covers

A slow analysis can come from checkout, tests, the scanner, uploading or server processing. Measuring each part helps you change the right setting without reducing what is checked.

Before you start

Use a repeatable job and record its commit, scanner version and settings. Compare runs with the same files and coverage report before changing resources or exclusions.

Step 1: Measure each stage

Record the elapsed times:

Checkout/history:       ___ seconds
Dependencies/tools:     ___ seconds
Build/tests/coverage:   ___ seconds
Local analysis/upload: ___ seconds
Server queue/compute:  ___ seconds

Scanner upload time and server queue time are different. Use job timestamps and SonarQube Background Tasks to separate them.

Step 2: Check analyzed files

Look for dependency folders, build output or generated files included by mistake. Correct the scope rather than excluding difficult application files just to reduce time.

Step 3: Check caching and memory

Use caches supported by your scanner and build tools. Do not share writable caches with untrusted jobs. Check memory and CPU use for the process that is actually slow; increasing the scanner’s memory will not fix a busy server queue.

Step 4: Compare after one change

Rerun the same commit after changing one setting. Compare both time and analyzed file counts. Keep tests, coverage import and quality-gate checks in place.

Check the result

An improvement should reduce time without losing expected files or checks. Record the result as a local measurement, not a general performance claim.

References

PB
Written by

Parul Bedi

Notes and guides by Parul Bedi.

Up next

Troubleshoot a Docker Container Step by Step

Docker October 31, 2026 1 min read
Open post

Conversation

0 comments

No comments yet. Start the conversation below.

Leave a comment

Replying to a comment.
Be kind. Markdown is not supported in comments.