How to postpone a new scanning process until current scanning process has finished?

I use SonarLint ( with IntelliJ (see below), when the IDE gets idle SonarLint launch a new scanning process after a couple of seconds and a new build process may also be started after some delay.

I tend to typ for some seconds, pause (IDE gets idle) and then continue typing and so on. The IDE will postpone a new build process if one is already scheduled, but SonarLint seam to schedule a new scanning process when the IDE gets idle (with some delay). The problem is that new scanning processes are scheduled after each other and IntelliJ can sometimes have about 100 scanning process scheduled which consumes many resources (slows IntelliJ down dramatically).

In IntelliJ I can have the build process postponed if another build process is already scheduled, are there any settings for SonarLint that will postpone new scanning process until previous scanning is complete?

I can understand that different scanning processes scan different files, I’m looking for a way to avoid having the same file scheduled many times.

I can reproduce this by slowly editing a comment (ie duplicating a one-line comment) in a Java-file.
In the log file I can see that build process are launched, scanning of current file and scanning of other open files are also launched “regulary”.

A quick fix is to disable SonarLint and only run it manually :frowning:

(I also use JRebel so I need the build process to run regularly)

Best Regards

IntelliJ IDEA 2019.3.3 (Ultimate Edition)
Build #IU-193.6494.35, built on February 11, 2020
Licensed to xxxxxxxxxx / xxxxxxxxxxxx
Subscription is active until October 7, 2020
Runtime version: 11.0.5+10-b520.38 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.6
GC: ParNew, ConcurrentMarkSweep
Memory: 1466M
Cores: 4
Registry: compiler.automake.postpone.when.idle.less.than=3500,,,
Non-Bundled Plugins: com.intellij.plugins.watcher, BashSupport, DBN, InnerBuilder, JRebelPlugin, Lombook Plugin, OdpsStudio, SequenceDiagram, com.bryansharpe.slackstorm, com.jetbrains.lightThemePreview, com.viartemev.requestmapper, de.u-mass.idea.copyConstructor, mobi.hsz.idea.gitignore, org.jetbrains.plugins.vue, org.sonarlint.idea, org.zalando.intellij.swagger,

Hi @Joran_Stark and welcome to this forum,

Indeed, we are triggering analysis after a delay. If you start typing before the end of the delay, the counter is “reset”.
Once an analysis has been submitted, a new change will queue a new analysis (still with the same delay). This is to ensure your latest changes are always analyzed. Since a single file analysis is normally quite fast (<1s) this is very unlikely you observe analysis jobs “stacking”.

to me this is what we should investigate, as this is not the expected behavior. I guess this might come from JRebel, since we are triggering an analysis of all open files each time the project is rebuilt (still to ensure fresh results).
I will try to install JRebel and see if I can reproduce.