ES: merge frequent importing requests for the same project

This commit is contained in:
Vladislav.Soroka
2017-12-20 15:18:53 +03:00
parent 438202c658
commit 001696ef48
@@ -81,6 +81,7 @@ public class ExternalSystemProjectsWatcherImpl extends ExternalSystemTaskNotific
private static final Key<Long> 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<Document> 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()) {