Slow switch in subversion
We have a project in our repository that is branched off of the trunk. It has existed for about 18 months and has about 500 revisions committed to it. All changes to the trunk durring that time have been consistently merged into the branch.
At this point when we run a switch operation between the two it takes upwards of two minutes and seems to stall on some particular files.
For testing I have removed all merge info with no luck.
As a further test, I created a new branch off of the trunk. I then merged the differences between the original branch and the trunk 开发者_开发问答and committed them into the new branch.
The new and the old branches are now identical according to the svn utilities.
If I switch between the trunk and the new branch, there are no speed issues.
It seems like there may be something in the repo causing this. The only thing I can think of at this point is that, since there is a lot of history on the branch, the system is comparing every revision.
We are using svn 1.6 and operating through the file: protocol.
Any ideas?
Switching requires that the files are first checked for local modifications. This is done by comparing the last-write-times of the files. That check is fast, but if some files have their last-write-time changed but then don't have any modifications (e.g., file modified, saved, then the modifications were undone and saved again), then that check takes much longer since SVN has to do a byte-by-byte comparison of the file content.
To 'fix' those last-write-times that might be wrong, running the cleanup command would help.
精彩评论