|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Slow CheckoutI 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); } |
|
|
Re: Slow CheckoutHello Ted,
What platform do you run SVNKit on? Do you have jna.jar on the classpath? Alexander Kitaev, TMate Software, http://svnkit.com/ - Java [Sub]Versioning Library! photoTed wrote: > 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); > } > --------------------------------------------------------------------- To unsubscribe, e-mail: svnkit-users-unsubscribe@... For additional commands, e-mail: svnkit-users-help@... |
|
|
Re: Slow CheckoutAlexander,
You rock. I'd hoped it would be a small amount of change to my code, but only adding a library to the classpath. Sweet. Went from 50 seconds to 14. Thanks. Ted |
| Free embeddable forum powered by Nabble | Forum Help |