« Return to Thread: Slow Checkout

Slow Checkout

by photoTed :: Rate this Message:

Reply to Author | View in Thread

I wrote the simple test code below to time checking out a folder from an SVN repository.  This code takes ~50 seconds to run.  Is there something I can do to speed it up?  As a reference the same checkout with Tortoise takes >10 seconds and Eclipse w/ svnkit is ~2x faster.

SVNKit Ver: 1.2.3
SVN Ver: 1.5.6

Tx,
Ted

private String urlString = "http://gccodesvn-dev.generalcode.com";
private String name = "me";
private String password = "password";

public static void main(String[] args) {
        try {
                SvnTest app = new SvnTest();
                app.svnSetup("dev");
                app.simpleCheckout("/Codes/NY/Albion,Town,AL1125/wip");
        } catch (Exception e) {
                e.printStackTrace();
        }
}

private void simpleCheckout(String folderName) throws SVNException {
        deleteDir(new File(checkoutFolder + "/test"));
    SVNURL url = SVNURL.parseURIEncoded(urlString + "/" + folderName);
    Date startTime = new Date();
        SVNUpdateClient updateClient = clientManager.getUpdateClient( );
        updateClient.doCheckout( url , new File(checkoutFolder + "/test") , SVNRevision.HEAD, SVNRevision.HEAD , SVNDepth.INFINITY, true );
    Date lapTime = new Date();
        System.out.println("Elapsed time: " + ((lapTime.getTime()-startTime.getTime())/1000));
}

private void svnSetup(String repo) throws SVNException {
                DAVRepositoryFactory.setup();
                authManager = SVNWCUtil.createDefaultAuthenticationManager(name, password);
                ISVNOptions options = SVNWCUtil.createDefaultOptions( true );
                clientManager = SVNClientManager.newInstance( options , authManager );
                wcClient = clientManager.getWCClient();
                repository = SVNRepositoryFactory.create(SVNURL.parseURIEncoded(urlString));
                repository.setAuthenticationManager(authManager);
}

 « Return to Thread: Slow Checkout