[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[Subclipse-users] Scalability problems with svnClientAdapter API

From: Bharat Khatri <bkhatri9_at_rockwellcollins.com>
Date: Wed, 18 Feb 2009 13:00:20 -0600

I'm using the svnClientAdapter API with JavaHL client. I'm making some API
calls to get some information for a group of files in a repository (using
a for loop so that API calls for each file are made one by one using the
same ISVNClientAdapter object). This works fine with a small number of
files. But when the number of files goes into a few thousand, things start
to fail and I get the SVNClientException saying: "RA layer request failed
on <full file path>. Could not connect to server ("http://mysvn")
 
Why is this happening ? Is each API call opeing a new connection to the
repository server, and hence failing when no new connection can be created
? What can I do to make this work ?
 
Here is my code:
 
ISVNClientAdapter svnClient = SVNExplorerUtils.getNewSvnClient();
for (int i = 0; i < fileElements.length; i++) {
        createLatestSVNFileRevisionContainer(
                svnClient, fileElements[i].getFileFullPath(),
                fileElements[i].getRepositoryRevision());
}

private static SVNFileRevisionContainer
createLatestSVNFileRevisionContainer(
                final ISVNClientAdapter svnClient, final String
repositoryPath,
                final long revision) throws MalformedURLException,
                SVNClientException {
        ISVNItem revisionSVNItem =
        new SVNItem(repositoryPath, revision);
        ISVNItem lastModifiedItem = null;
        String lastModifiedAuthor = null;
        SVNUrl itemURL =
                new SVNUrl(revisionSVNItem.getCompletePath());
        SVNRevision itemRevision =
                new SVNRevision.Number(revisionSVNItem
                .getRepositoryRevision());
        ISVNDirEntry entry =
        null;
        entry = svnClient.getDirEntry(itemURL, itemRevision);
        long lastModifiedRevision =
entry.getLastChangedRevision().getNumber();
        lastModifiedAuthor = entry.getLastCommitAuthor();
        if (lastModifiedRevision ==
revisionSVNItem.getRepositoryRevision()) {
                lastModifiedItem =
                        new SVNItem(revisionSVNItem);
}
else {
        ISVNInfo info = svnClient.getInfo(itemURL,
                new SVNRevision.Number(
                lastModifiedRevision), itemRevision);
        lastModifiedItem =
                new SVNItem(info.getUrlString(),
                        lastModifiedRevision);
}

return new SVNFileRevisionContainer(null, revisionSVNItem,
        lastModifiedItem, lastModifiedAuthor);
}

Thanks

Bharat Khatri

------------------------------------------------------
http://subclipse.tigris.org/ds/viewMessage.do?dsForumId=1047&dsMessageId=1187581

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subclipse.tigris.org].
Received on 2009-02-18 20:01:30 CET

This is an archived mail posted to the Subclipse Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.