Commit 28635c70 authored by agurov's avatar agurov

Status refresh for files does unnecessary work that significantly reduces...

Status refresh for files does unnecessary work that significantly reduces performance on large projects (bug 473026)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=473026

git-svn-id: https://dev.eclipse.org/svnroot/technology/org.eclipse.subversive/trunk@21491 ee007c2a-0a25-0410-9ab9-bf268980928c
parent 824c902f
......@@ -636,28 +636,35 @@ public class SVNRemoteStorage extends AbstractSVNStorage implements IRemoteStora
return (IConnectedProjectInformation)provider;
}
protected void refreshLocalResourceImpl(IResource resource, int depth) {
if (resource.getType() == IResource.PROJECT) {
IConnectedProjectInformation info = (IConnectedProjectInformation)RepositoryProvider.getProvider(resource.getProject(), SVNTeamPlugin.NATURE_ID);
if (info != null) {
try {
info.relocateResource();
}
catch (CoreException ex) {
throw new RuntimeException(ex);
}
}
}
protected void refreshLocalResourceImpl(IResource resource, int depth) {
IPath rootPath = resource.getFullPath();
for (Iterator it = this.localResources.entrySet().iterator(); it.hasNext();) {
Map.Entry entry = (Map.Entry)it.next();
ILocalResource local = (ILocalResource)entry.getValue();
IPath currentPath = (IPath)entry.getKey();
if (IStateFilter.SF_NOTEXISTS.accept(local) || rootPath.isPrefixOf(currentPath)) {
it.remove();
this.switchedToUrls.remove(currentPath);
this.parent2Children.remove(currentPath);
this.parent2Children.remove(currentPath.removeLastSegments(1));
if (resource.getType() == IResource.FILE) {
this.localResources.remove(rootPath);
this.switchedToUrls.remove(rootPath);
this.parent2Children.remove(rootPath.removeLastSegments(1));
}
else {
if (resource.getType() == IResource.PROJECT) {
IConnectedProjectInformation info = (IConnectedProjectInformation)RepositoryProvider.getProvider(resource.getProject(), SVNTeamPlugin.NATURE_ID);
if (info != null) {
try {
info.relocateResource();
}
catch (CoreException ex) {
throw new RuntimeException(ex);
}
}
}
for (Iterator it = this.localResources.entrySet().iterator(); it.hasNext();) {
Map.Entry entry = (Map.Entry)it.next();
ILocalResource local = (ILocalResource)entry.getValue();
IPath currentPath = (IPath)entry.getKey();
if (IStateFilter.SF_NOTEXISTS.accept(local) || rootPath.isPrefixOf(currentPath)) {
it.remove();
this.switchedToUrls.remove(currentPath);
this.parent2Children.remove(currentPath);
this.parent2Children.remove(currentPath.removeLastSegments(1));
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment