mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[r=anton] less calls to file.getLength()
This commit is contained in:
@@ -1539,7 +1539,7 @@ public class FileBasedIndex implements ApplicationComponent {
|
||||
IndexingStamp.flushCache();
|
||||
final List<ID<?, ?>> affectedIndices = new ArrayList<ID<?, ?>>(myIndices.size());
|
||||
|
||||
final boolean isTooLarge = isTooLarge(file);
|
||||
Boolean isTooLarge = null;
|
||||
for (final ID<?, ?> indexId : myIndices.keySet()) {
|
||||
try {
|
||||
if (!needsFileContentLoading(indexId)) {
|
||||
@@ -1548,8 +1548,13 @@ public class FileBasedIndex implements ApplicationComponent {
|
||||
}
|
||||
}
|
||||
else { // the index requires file content
|
||||
if (!isTooLarge && shouldUpdateIndex(file, indexId)) {
|
||||
affectedIndices.add(indexId);
|
||||
if (shouldUpdateIndex(file, indexId)) {
|
||||
if (isTooLarge == null) {
|
||||
isTooLarge = Boolean.valueOf(isTooLarge(file));
|
||||
}
|
||||
if (!isTooLarge.booleanValue()) {
|
||||
affectedIndices.add(indexId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user