1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 14:15:23 +02:00

[291738] [efs] repeated queries to RSEFileStoreImpl.fetchInfo() in short time-span should be reduced

This commit is contained in:
David McKnight 2009-11-05 19:26:57 +00:00
parent 87fe6cba8e
commit 6061e69e55

View file

@ -518,7 +518,7 @@ public class RSEFileStoreImpl extends FileStore
public IFileInfo fetchInfo(int options, IProgressMonitor monitor) throws CoreException {
long curTime = System.currentTimeMillis();
// don't clear cache when there are several successive queries in a short time-span
if (_lastFetch == 0 || ((curTime - _lastFetch) > 1000)){
if (_lastFetch == 0 || ((curTime - _lastFetch) > 5000)){
// clear cache in order to query latest info
cacheRemoteFile(null);
_lastFetch = curTime;
@ -648,6 +648,7 @@ public class RSEFileStoreImpl extends FileStore
if (remoteFile.isFile()) {
try {
cacheRemoteFile(null);
return subSys.getInputStream(remoteFile.getParentPath(), remoteFile.getName(), true, monitor);
}
catch (SystemMessageException e) {
@ -742,6 +743,7 @@ public class RSEFileStoreImpl extends FileStore
} else {
options = IFileService.NONE;
}
cacheRemoteFile(null);
return subSys.getOutputStream(remoteFile.getParentPath(), remoteFile.getName(), options, monitor);
}
catch (SystemMessageException e) {