From 2ecb0a4b1ffdddd9348bcb3b3566a889da4079b9 Mon Sep 17 00:00:00 2001 From: "Maxim.Mossienko" Date: Tue, 27 Jun 2017 20:15:34 +0200 Subject: [PATCH] start dumb mode if there are many pending vfs changes to be processed --- .../com/intellij/util/indexing/FileBasedIndexImpl.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndexImpl.java b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndexImpl.java index 7bbd2f386691..69ab2b03a203 100644 --- a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndexImpl.java +++ b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndexImpl.java @@ -1932,6 +1932,15 @@ public class FileBasedIndexImpl extends FileBasedIndex implements BaseComponent, !PowerSaveMode.isEnabled()) { myScheduledVfsEventsWorkers.incrementAndGet(); myVfsEventsExecutor.submit(this::processFilesInReadActionWithYieldingToWriteAction); + + for(Project project:ProjectManager.getInstance().getOpenProjects()) { + DumbServiceImpl dumbService = DumbServiceImpl.getInstance(project); + DumbModeTask task = FileBasedIndexProjectHandler.createChangedFilesIndexingTask(project); + + if (task != null) { + dumbService.queueTask(task); + } + } } }