simpler code to avoid performance regression (IDEA-192192)

This commit is contained in:
Maxim.Mossienko
2018-05-25 22:33:43 +02:00
parent 0479959fee
commit f983582462
@@ -302,9 +302,11 @@ public class FileBasedIndexImpl extends FileBasedIndex implements BaseComponent,
@Override @Override
public void requestReindex(@NotNull final VirtualFile file) { public void requestReindex(@NotNull final VirtualFile file) {
((GistManagerImpl)GistManager.getInstance()).invalidateData(); ((GistManagerImpl)GistManager.getInstance()).invalidateData();
// this is the same vfs event handling sequence that is produces after events of FileContentUtilCore.reparseFiles // todo: this is the same vfs event handling sequence that is produces after events of FileContentUtilCore.reparseFiles
myChangedFilesCollector.invalidateIndicesRecursively(file, false); // but it is more costly than current code, see IDEA-192192
myChangedFilesCollector.buildIndicesForFileRecursively(file, false); //myChangedFilesCollector.invalidateIndicesRecursively(file, false);
//myChangedFilesCollector.buildIndicesForFileRecursively(file, false);
myChangedFilesCollector.invalidateIndicesRecursively(file, true);
if (myInitialized) myChangedFilesCollector.ensureUpToDateAsync(); if (myInitialized) myChangedFilesCollector.ensureUpToDateAsync();
} }