From 001696ef4840cb73d03cd5a9acc4022084c00bd2 Mon Sep 17 00:00:00 2001 From: "Vladislav.Soroka" Date: Wed, 20 Dec 2017 15:16:41 +0300 Subject: [PATCH] ES: merge frequent importing requests for the same project --- .../project/autoimport/ExternalSystemProjectsWatcherImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/project/autoimport/ExternalSystemProjectsWatcherImpl.java b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/project/autoimport/ExternalSystemProjectsWatcherImpl.java index 8784be59a751..8bf70ba68125 100644 --- a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/project/autoimport/ExternalSystemProjectsWatcherImpl.java +++ b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/project/autoimport/ExternalSystemProjectsWatcherImpl.java @@ -81,6 +81,7 @@ public class ExternalSystemProjectsWatcherImpl extends ExternalSystemTaskNotific private static final Key CRC_WITHOUT_SPACES_BEFORE_LAST_IMPORT = Key.create("ExternalSystemProjectsWatcher.CRC_WITHOUT_SPACES_BEFORE_LAST_IMPORT"); private static final int DOCUMENT_SAVE_DELAY = 1000; + private static final int REFRESH_MERGING_TIME_SPAN = 2000; private final Project myProject; private final Set myChangedDocuments = new THashSet<>(); @@ -99,7 +100,7 @@ public class ExternalSystemProjectsWatcherImpl extends ExternalSystemTaskNotific DOCUMENT_SAVE_DELAY, false, ANY_COMPONENT, myProject); myRefreshRequestsQueue = new MergingUpdateQueue("ExternalSystemProjectsWatcher: Refresh requests queue", - 0, false, ANY_COMPONENT, myProject, null, false); + REFRESH_MERGING_TIME_SPAN, false, ANY_COMPONENT, myProject, null, false); myImportAwareManagers = ContainerUtil.newArrayList(); for (ExternalSystemManager manager : ExternalSystemApiUtil.getAllManagers()) {