You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[performance] Avoid 2nd file access on lightweightAutoRefresh #1442
When reading file content with force==true it is tried to read that file
from file system. Only if the read fails the existence of that file can
have changed and exception is thrown anyway. We just need to move the
"asyncRefresh" into the exception handler.
Hotspot from JDTs ResourceCompilationUnit.getContents()
fixes#1442
tested by Bug_303517
Copy file name to clipboardExpand all lines: resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/FileSystemResourceManager.java
+5-12Lines changed: 5 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -874,6 +874,7 @@ public InputStream read(IFile target, boolean force, IProgressMonitor monitor) t
874
874
try {
875
875
returnstore.openInputStream(EFS.NONE, monitor);
876
876
} catch (CoreExceptione) {
877
+
asyncRefresh(target);
877
878
if (e.getStatus().getCode() == EFS.ERROR_NOT_EXISTS) {
0 commit comments