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:
parent
87fe6cba8e
commit
6061e69e55
1 changed files with 3 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue