|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
Performance problems while getting all dirs from a repositoryHello all,
to get all directories from a repository I use the following code: public List getReposTree() throws DataProviderException { SVNLogClient logClient = new SVNLogClient(this.repository.getAuthenticationManager(), new DefaultSVNOptions()); final List<SVNDirEntry> entries = new LinkedList(); try { logClient.doList(this.repository.getLocation(), SVNRevision.HEAD, SVNRevision.HEAD, false, true, new ISVNDirEntryHandler() { public void handleDirEntry(SVNDirEntry entry) throws SVNException { entries.add(entry); } }); } catch (SVNException e) { e.printStackTrace(); } return entries; } Is there a way to speed up this function? At the moment my repository is not very big, but this function needs 5 seconds to finish. Thanks for any help, Sandro Frenzel |
|
|
Re: Performance problems while getting all dirs from a repositoryHello Sandro,
Using low-level API (SVNRepository) and in particular SVNRepository.status method with custom ISVNEditor implementation would let you get the whole repository tree faster, comparing to doList(...) call. See https://wiki.svnkit.com/Recursively%20fetching%20properties%20from%20a%20repository%20(low-level%20API) for details. Article tells about fetching properties, but as you'll see repository tree is received at the same time. Alexander Kitaev, TMate Software, http://svnkit.com/ - Java [Sub]Versioning Library! Sandro F wrote: > Hello all, to get all directories from a repository I use the following > code: /public List getReposTree() throws DataProviderException { > SVNLogClient logClient = new > SVNLogClient(this.repository.getAuthenticationManager(), new > DefaultSVNOptions()); final List entries = new LinkedList(); try { > logClient.doList(this.repository.getLocation(), SVNRevision.HEAD, > SVNRevision.HEAD, false, true, new ISVNDirEntryHandler() { public void > handleDirEntry(SVNDirEntry entry) throws SVNException { > entries.add(entry); } }); } catch (SVNException e) { > e.printStackTrace(); } return entries; } / Is there a way to speed up > this function? At the moment my repository is not very big, but this > function needs 5 seconds to finish. Thanks for any help, Sandro Frenzel > ------------------------------------------------------------------------ > View this message in context: Performance problems while getting all > dirs from a repository > <http://www.nabble.com/Performance-problems-while-getting-all-dirs-from-a-repository-tp24198126p24198126.html> > Sent from the SVNKit - Users mailing list archive > <http://www.nabble.com/SVNKit---Users-f18684.html> at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: svnkit-users-unsubscribe@... For additional commands, e-mail: svnkit-users-help@... |
|
|
Re: Performance problems while getting all dirs from a repositoryDoes not work for me so far :(.
Does it only work with a new version from SVNKit? Unfortunately I have to use the very old version 1.0 :(! But, if this can fix my problem I will try to update SVNKit. Are the new versions compatible to all 1.0 functions? Regards, Sandro
|
|
|
Re: Performance problems while getting all dirs from a repositoryHello Sandro,
> Does not work for me so far :(. Could you provide more information on what exactly doesn't work? > Does it only work with a new version from SVNKit? Unfortunately I have to > use the very old version 1.0 :(! But, if this can fix my problem I will try > to update SVNKit. Are the new versions compatible to all 1.0 functions? Newer versions of SVNKit are not binary compatible with 1.0 version of it, but in general you'll have to do not a lot of changes to the existing code you have - and we'll be glad to help you with the transition. Alexander Kitaev, TMate Software, http://svnkit.com/ - Java [Sub]Versioning Library! Sandro F wrote: > Does not work for me so far :(. > > Does it only work with a new version from SVNKit? Unfortunately I have to > use the very old version 1.0 :(! But, if this can fix my problem I will try > to update SVNKit. Are the new versions compatible to all 1.0 functions? > > Regards, > Sandro > > > > > > Alexander Kitaev-3 wrote: >> Hello Sandro, >> >> Using low-level API (SVNRepository) and in particular >> SVNRepository.status method with custom ISVNEditor implementation would >> let you get the whole repository tree faster, comparing to doList(...) >> call. >> >> See >> https://wiki.svnkit.com/Recursively%20fetching%20properties%20from%20a%20repository%20(low-level%20API) >> for details. Article tells about fetching properties, but as you'll see >> repository tree is received at the same time. >> >> Alexander Kitaev, >> TMate Software, >> http://svnkit.com/ - Java [Sub]Versioning Library! >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: svnkit-users-unsubscribe@... >> For additional commands, e-mail: svnkit-users-help@... >> >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: svnkit-users-unsubscribe@... For additional commands, e-mail: svnkit-users-help@... |
|
|
Re: Performance problems while getting all dirs from a repositoryHello Alexander,
the editor.getDirProps() Method returns a emtpy field. But why, I cannot reproduce. When I set a breakpoint in the PropFetchingEditor class it never stops there. However, I upgraded the SVNKit library to the latest version and it works :). The changes I had to do, were minimal. I had to change the doCopy function because of the new construtor (->SVNCopySource). Furthermore the getFile() function of the SVNRepository class needed a SVNProperties object. That was all (hope so). After the upgrade the editor.getDirProps() returns something about the repository dirs. And yes, also the paths :))! Now I have to find out in which order the paths were returned. But I am sure you know it, don`t you? Regards, Sandro
|
| Free embeddable forum powered by Nabble | Forum Help |