Hi All,
I have just tried the new release and found a pretty massive performace
regression for remote repositories. It is hitting the server to get the
contents of the reference document (once only though). I didn't spot it
before because i use a local repo.
It looks like we actually use a remote resource in our sync info to
represent the base revision (like CVS does). I have attached a patch
that fixes the performance problems for me. It will now use a base
resource, so getContents will be a local filesystem read now. It also
removes some redundant throws clauses.
This is only going to be a problem for people who connect to a
repository over a slow connection (such as the internet).
I would have checked it in, but I know very little about the sync stuff
and don't want to make things worse...
cheers,
Brock
Index:
D:/data/eclipse/workspace/core/src/org/tigris/subversion/subclipse/core/sync/SVNStatusSyncInfo.java
===================================================================
---
D:/data/eclipse/workspace/core/src/org/tigris/subversion/subclipse/core/sync/SVNStatusSyncInfo.java
(revision 1476)
+++
D:/data/eclipse/workspace/core/src/org/tigris/subversion/subclipse/core/sync/SVNStatusSyncInfo.java
(working copy)
@@ -9,6 +9,8 @@
import org.eclipse.team.core.variants.IResourceVariant;
import org.eclipse.team.core.variants.IResourceVariantComparator;
import org.tigris.subversion.subclipse.core.ISVNLocalResource;
+import org.tigris.subversion.subclipse.core.resources.BaseFile;
+import org.tigris.subversion.subclipse.core.resources.BaseFolder;
import org.tigris.subversion.subclipse.core.resources.LocalResourceStatus;
import org.tigris.subversion.subclipse.core.resources.RemoteFile;
import org.tigris.subversion.subclipse.core.resources.RemoteFolder;
@@ -115,7 +117,19 @@
if( localStatusInfo == null
|| localStatusInfo.getRevision() == null )
return null;
- return createResourceVariant(local, localStatusInfo.getRevision());
+ ISVNLocalResource svnResource =
SVNWorkspaceRoot.getSVNResourceFor( local );
+ if( local.getType() == IResource.FILE ) {
+ return new BaseFile(svnResource,
+ localStatusInfo.getRevision(),
+ null,
+ null);
+ }
+ else {
+ return new BaseFolder(svnResource,
+ localStatusInfo.getRevision(),
+ null,
+ null);
+ }
}
private static IResourceVariant
createLatestResourceVariant(IResource local, StatusInfo localStatusInfo,
StatusInfo remoteStatusInfo) {
if( remoteStatusInfo == null
Index:
D:/data/eclipse/workspace/core/src/org/tigris/subversion/subclipse/core/resources/BaseFolder.java
===================================================================
---
D:/data/eclipse/workspace/core/src/org/tigris/subversion/subclipse/core/resources/BaseFolder.java
(revision 1476)
+++
D:/data/eclipse/workspace/core/src/org/tigris/subversion/subclipse/core/resources/BaseFolder.java
(working copy)
@@ -29,7 +29,6 @@
import org.tigris.subversion.subclipse.core.util.Assert;
import org.tigris.subversion.svnclientadapter.SVNNodeKind;
import org.tigris.subversion.svnclientadapter.SVNRevision;
-import org.tigris.subversion.svnclientadapter.SVNStatusKind;
/**
* represents the base revision of a folder
@@ -46,7 +45,7 @@
ISVNLocalResource localResource,
SVNRevision.Number lastChangedRevision,
Date date,
- String author) throws SVNException {
+ String author) {
super(null, localResource.getRepository(),
localResource.getUrl(), SVNRevision.BASE, lastChangedRevision, date,
author);
Assert.isNotNull(localResource);
this.localResource = localResource;
@@ -82,16 +81,10 @@
continue;
}
- // Don't create base entries for files that aren't
managed yet
- if (statuses[i].getTextStatus() ==
SVNStatusKind.UNVERSIONED) {
+ if (!statuses[i].hasRemote()) {
continue;
}
- // External entries don't have base information either
- if (statuses[i].getTextStatus() ==
SVNStatusKind.EXTERNAL) {
- continue;
- }
-
if (statuses[i].getNodeKind() == SVNNodeKind.DIR) {
IContainer container =
localResource.getIResource().getWorkspace().getRoot().getContainerForLocation(new
Path(statuses[i].getFile().getAbsolutePath()));
if
(localResource.getIResource().equals(container.getParent())) {
Index:
D:/data/eclipse/workspace/core/src/org/tigris/subversion/subclipse/core/resources/BaseFile.java
===================================================================
---
D:/data/eclipse/workspace/core/src/org/tigris/subversion/subclipse/core/resources/BaseFile.java
(revision 1476)
+++
D:/data/eclipse/workspace/core/src/org/tigris/subversion/subclipse/core/resources/BaseFile.java
(working copy)
@@ -19,7 +19,6 @@
import org.tigris.subversion.subclipse.core.ISVNLocalResource;
import org.tigris.subversion.subclipse.core.ISVNRemoteFile;
import org.tigris.subversion.subclipse.core.Policy;
-import org.tigris.subversion.subclipse.core.SVNException;
import org.tigris.subversion.subclipse.core.util.Assert;
import org.tigris.subversion.svnclientadapter.ISVNAnnotations;
import org.tigris.subversion.svnclientadapter.ISVNClientAdapter;
@@ -37,7 +36,7 @@
ISVNLocalResource localResource,
SVNRevision.Number lastChangedRevision,
Date date,
- String author) throws SVNException {
+ String author) {
super(null, localResource.getRepository(),
localResource.getUrl(), SVNRevision.BASE, lastChangedRevision, date,
author);
Assert.isNotNull(localResource);
this.localResource = localResource;
Received on Tue Jul 26 11:27:55 2005