diff options
author | Michael Valenta | 2004-10-04 18:42:07 +0000 |
---|---|---|
committer | Michael Valenta | 2004-10-04 18:42:07 +0000 |
commit | a6f01e3d1081117675784a9ad5433af8dde4e223 (patch) | |
tree | 685434e95f229c72e53144a5861c6a47ff26a916 | |
parent | 08744ade9faf8a4b0d91ad2843007d4329fc7527 (diff) | |
download | eclipse.platform.team-a6f01e3d1081117675784a9ad5433af8dde4e223.tar.gz eclipse.platform.team-a6f01e3d1081117675784a9ad5433af8dde4e223.tar.xz eclipse.platform.team-a6f01e3d1081117675784a9ad5433af8dde4e223.zip |
Bug 75237 Synchronizes resources in plug-in code performance problem
-rw-r--r-- | bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSResourceVariantTree.java | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSResourceVariantTree.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSResourceVariantTree.java index 9e0aab5a4..394d0f21c 100644 --- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSResourceVariantTree.java +++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSResourceVariantTree.java @@ -283,17 +283,25 @@ public class CVSResourceVariantTree extends ResourceVariantTree { protected IResource[] refresh(IResource resource, int depth, IProgressMonitor monitor) throws TeamException { IResource[] changedResources = null; monitor.beginTask(null, 100); - // Wait up to 10 seconds for build to finish + // Wait while a build is running + // Initially wait for a short time and then increase the wait + // if the build is still running int count = 0; - while (count < 10 + int waitTime = 10; + while (count < 15 && (isJobInFamilyRunning(ResourcesPlugin.FAMILY_AUTO_BUILD) || isJobInFamilyRunning(ResourcesPlugin.FAMILY_MANUAL_BUILD))) { try { - Thread.sleep(1000); + Thread.sleep(waitTime); } catch (InterruptedException e) { // Conitinue } count++; + if (count >= 10) { + waitTime = 1000; + } else if (count >= 5) { + waitTime = 100; + } Policy.checkCanceled(monitor); } try { |