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
public void requestReindex(@NotNull final VirtualFile file) {
((GistManagerImpl)GistManager.getInstance()).invalidateData();
// this is the same vfs event handling sequence that is produces after events of FileContentUtilCore.reparseFiles
myChangedFilesCollector.invalidateIndicesRecursively(file, false);
myChangedFilesCollector.buildIndicesForFileRecursively(file, false);
// todo: this is the same vfs event handling sequence that is produces after events of FileContentUtilCore.reparseFiles
// but it is more costly than current code, see IDEA-192192
//myChangedFilesCollector.invalidateIndicesRecursively(file, false);
//myChangedFilesCollector.buildIndicesForFileRecursively(file, false);
myChangedFilesCollector.invalidateIndicesRecursively(file, true);
if (myInitialized) myChangedFilesCollector.ensureUpToDateAsync();
}