SVN/TortoiseSVN painfully slow

五迷三道 提交于 2019-12-03 03:29:59

问题


I'm experiencing painfully slow operations with one of our SVN repositories/projects.

For example, it's taking 5-10 minutes to revert the changes in one small file (10 KB). Or about 40-60 minutes to check out the project of 100 MB.

There are about 30 other projects on the same server, some vastly bigger than this one, and none of them preform like this.

One thing to note is that this project is a Magento project. It's not very large in terms of disk space, but I have 23k Files and 11k folders, and I have read SVN preforms badly when there are lots of little files; is this true? And is there anything I can do to speed things up?


回答1:


The Subversion working copy performs quite badly when there's a huge number of directories, like in your case. For write operations (even only locally) to the working copy, the working copy has to be locked, which means that a lock file is created in every directory (that's 11k file creates), then the action executes, and the those 11k files are deleted again.

Subversion 1.7 is moving to a different working copy format, that should resolve these problems. Until then there's a few tricks you might try to speed things up, like excluding the working copy from your virus scanner, disabling file monitors on the directory (like TortoiseSvnCache), and trying to reduce the total number of directories. (Perhaps by checking out a few separate working copies)




回答2:


There is a known issue with the use of the recycle bin with revert which causes slow reverting. Emptying your recycle bin and setting TortoiseSVN not to use it during revert operations both speed up this operation (see http://www.nabble.com/Revert-is-too-slow-td18222196.html).

This has definitely sped up my revert operations.




回答3:


I experienced extreme slowness with Subversion on Windows after changing my password. I had to delete all directories and files from %APPDATA%\Subversion\auth.

Now SVN is fast as a hare. My slowness occurred via both TortoiseSVN and the command line.




回答4:


SVN is slow if you use NFS (Network File System) for the working copy. This could be your problem.




回答5:


Try temporarily disabling your anti-virus software.




回答6:


Reverting changes in SVN is a local operation which shouldn't go to the server at all. So it sounds as though the problem is in your working copy of the project.

Try running 'svn cleanup' in the working copy; you may also want to check if you have problems with the hard drive or filesystem.




回答7:


Our SVN was running painfully slow through TortoiseSVN, Eclipse and command line. Commits and exports were slow. Our Zend Framework-based PHP projects would take an age to update and popping in a small commit of about three files would take 5-10 minutes.

Our SVN virtual machine (CentOS) only had 700 MB of RAM which seemed reasonable for a Linux CLI only running Subversion via Apache and has been running fine for about one year. We've only got about 20 projects and only three developers.

I've upped it to 1.5 GB of RAM and things are running much faster now, back to our old speeds.




回答8:


I also suffered a large slowdown after upgrading to TortoiseSVN 1.7.3.

Then I discovered I had a separate install of SVN 1.6.5. I uninstalled both and reinstalled TortoiseSVN and now things are much better. First update of the day in TortoiseSVN is still slow (1-2 minutes), but fast after that.




回答9:


We have face similar issue, the problem was TortoiseSvn (Version 1.9.7). For example, the repo browser took about 10 minutes to initial.

We have turned of the Show Locks feature and every thing fixed!

Right click on a folder and select Tortoise\Settings then General\Dialog 3 then deselect Show Locks

Also some good hints can be found at http://tigris-scm.10930.n7.nabble.com/Workaround-for-slow-RepositoryBrowser-on-large-repositories-td92324.html




回答10:


I have some projects which use the Eclipse IDE. If you capture the Eclipse project directories you get hundreds and hundreds of tiny files which has the same effect for my project as you're suffering on yours.

I think that when you check files out SVN does so one at a time which means that projects with huge numbers of files are always going to be slow and there's not much you can do about it (aside from avoiding frequent whole-repository operations).

Making changes to a single file shouldn't be slow though.

You may try the suggestions in another post on Stack Overflow about slow SVN. It could also be due to using a BDB database.



来源:https://stackoverflow.com/questions/949492/svn-tortoisesvn-painfully-slow

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!