Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2003-09-15 09:08:04 -0400
committerMichael Valenta2003-09-15 09:08:04 -0400
commit254b70f97dca0ca4405081e1b779e8d363f4dd59 (patch)
tree8203f63ac972aa7d576819c22a6aa03e18d1a864
parent765629bcbf995de74b825a2669ea06f3318f17fe (diff)
downloadeclipse.platform.team-254b70f97dca0ca4405081e1b779e8d363f4dd59.tar.gz
eclipse.platform.team-254b70f97dca0ca4405081e1b779e8d363f4dd59.tar.xz
eclipse.platform.team-254b70f97dca0ca4405081e1b779e8d363f4dd59.zip
41942: [CVS Repo View Concurrency] UI unreponsive when repo contains a large number of folder
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/FetchMembersOperation.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/FetchMembersOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/FetchMembersOperation.java
index 4e268038e..123af451e 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/FetchMembersOperation.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/FetchMembersOperation.java
@@ -35,8 +35,8 @@ import org.eclipse.team.internal.ccvs.ui.Policy;
*/
public class FetchMembersOperation extends RemoteOperation {
- private IElementCollector collector;
- private RemoteFolderFilter filter = new RemoteFolderFilter();
+ /* internal uzse only */ IElementCollector collector;
+ /* internal uzse only */ RemoteFolderFilter filter = new RemoteFolderFilter();
public static class RemoteFolderFilter {
public ICVSRemoteResource[] filter(ICVSRemoteResource[] resource) {
@@ -45,9 +45,9 @@ public class FetchMembersOperation extends RemoteOperation {
}
public class InternalRemoteFolderMemberFetcher extends RemoteFolderMemberFetcher {
- int sendIncrement = 100;
- int foldersSent = 0;
+ long sendIncrement = 100;
List unsent = new ArrayList();
+ long intervalStart;
protected InternalRemoteFolderMemberFetcher(RemoteFolder parentFolder, CVSTag tag) {
super(parentFolder, tag);
}
@@ -59,12 +59,17 @@ public class FetchMembersOperation extends RemoteOperation {
protected RemoteFolder recordFolder(String name) {
RemoteFolder folder = super.recordFolder(name);
unsent.add(folder);
- if (unsent.size() == sendIncrement) {
+ if (isTimeToSend()) {
sendFolders();
}
return folder;
}
+ private boolean isTimeToSend() {
+ long currentTime = System.currentTimeMillis();
+ return (currentTime - intervalStart) > sendIncrement;
+ }
protected IStatus performUpdate(IProgressMonitor progress) throws CVSException {
+ intervalStart = System.currentTimeMillis();
IStatus status = super.performUpdate(progress);
sendFolders();
return status;
@@ -77,6 +82,7 @@ public class FetchMembersOperation extends RemoteOperation {
updateParentFolderChildren();
collector.add(filter.filter((ICVSRemoteFolder[]) unsent.toArray(new ICVSRemoteFolder[unsent.size()])), getProgressMonitor());
unsent.clear();
+ intervalStart = System.currentTimeMillis();
}
private void sendFiles() {
collector.add(getFiles(), getProgressMonitor());

Back to the top