Mark Phippard wrote:
> Brock Janiczak <brockj@tpg.com.au> wrote on 02/17/2006 04:34:27 AM:
>
>
>> How many directories where there? There should only be one entry per
>> directory in that map. I would have expected the LinkedHashSet to work
>> with at least hundreds of entries. Perhaps the solution is as simple as
>>
>
>
>> checking if the entry exists in the set before adding?
>>
>
> There were 12 folders, each with 500 files for a total of 6000.
>
> Are you saying with the existing code there should be only 12 entries or
> that we ought to be able to change it to only need 12 entries?
>
There should have been 12 entries. In particular, look at the section
that handles IFiles. It will add it's parent's .svn folder to the set.
I can't see anyting int he LinkedHashSet implementation (at least in
Java 5) that would cause such poor performance
> BTW, feel free to provide the patch for this.
>
here it is (untested)
Index:
D:/data/eclipse/workspace/core/src/org/tigris/subversion/subclipse/core/client/OperationManager.java
===================================================================
---
D:/data/eclipse/workspace/core/src/org/tigris/subversion/subclipse/core/client/OperationManager.java
(revision 2099)
+++
D:/data/eclipse/workspace/core/src/org/tigris/subversion/subclipse/core/client/OperationManager.java
(working copy)
@@ -134,7 +134,9 @@
{
entries =
workspaceRoot.getProject(pathEclipse.lastSegment()).getFolder(new
Path(SVNProviderPlugin.getPlugin().getAdminDirectoryName()));
}
- changedResources.add(entries);
+ if (!changedResources.contains(entries)) {
+ changedResources.add(entries);
+ }
}
else
{
@@ -154,7 +156,9 @@
}
svnDir = ((IContainer) resource).getFolder(new Path(
SVNProviderPlugin.getPlugin().getAdminDirectoryName()));
- changedResources.add(svnDir);
+ if (!changedResources.contains(svnDir)) {
+ changedResources.add(svnDir);
+ }
}
} else if (kind == SVNNodeKind.FILE) {
resource = workspaceRoot.getFileForLocation(pathEclipse);
@@ -162,7 +166,9 @@
if (resource != null) {
svnDir = resource.getParent().getFolder(
new
Path(SVNProviderPlugin.getPlugin().getAdminDirectoryName()));
- changedResources.add(svnDir);
+ if (!changedResources.contains(svnDir)) {
+ changedResources.add(svnDir);
+ }
}
}
}
> Mark
>
>
> _____________________________________________________________________________
> Scanned for SoftLanding Systems, Inc. and SoftLanding Europe Plc by IBM Email Security Management Services powered by MessageLabs.
> _____________________________________________________________________________
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subclipse.tigris.org
> For additional commands, e-mail: dev-help@subclipse.tigris.org
>
>
>
>
Received on Fri Feb 17 22:02:14 2006