views:

45

answers:

1

In my project, every bug and/or enhancement must be developed in a branch before getting merge in the trunk. Since the branch (copy trunk) are not deleted after completion, we have actually more than 200 branch unused in our repository (new project).

I recently notice a slow down from the server for small operation in the repository. My coworker said to me that deleting Branch wont improve the speed of svn since all previous version log/source code stay in the repository.

I am not really convince by this idea and on the contrary I think that if the HEAD of the repository have less folder/file. Its management should be faster (and at the same time the branches directory should be more easier to handle).

What is your opinion on this problem ? (and if you are some reference to convince them I am true please tell me)

+2  A: 

I believe your coworker is correct in that deleting old branches will not improve the speed. Deleting a branch actually adds more revisions to the repository, so if anything it will slow things down. But you will probably not notice, and your repository is probably getting slow for a different reason.

However, you are absolutely right that leaving old work in the "branches" directory is going to become unmanageable over time. I'm surprised that your project only has 200 such fixes; it must be very new. I would suggest that you should delete the old work because everything still remains in the Subversion history if you ever need to refer back to it. Having a clean, sensible workspace is much more valuable than shards of old work.

Greg Hewgill
The number of revisions doesn't necessarily matter though: what counts is the speed at which the svn server can construct the filesystem tree, not the file contents. IIRC it stored snapshots of the tree at each revision rather than building it from patches - but I can't find any reference for this now.
Rup
@greg: Thanks for your opinion. Yes it is a very new project (not even in prototype mode) but it is not that big too. So you mean that subversion is not optimized to operate on the HEAD faster than on other revision.
Phong
@Rup @Phong Subversion stores historical revisions in a tree-like manner called "skip deltas", see [SVN performance after many revisions](http://stackoverflow.com/questions/127692/svn-performance-after-many-revisions) for more information. I'm afraid I don't know enough about the internals of Subversion to comment on optimisations in that area.
Greg Hewgill
For the file contents, sure. I thought it did something else for the filesystem tree though and it's the tree that would cause performance problems if there were lots of branches.
Rup