63

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?

3
  • What repository format are you using on the server? FS? BDB? You could try a different one? Jun 4, 2009 at 9:42
  • 1
    dude this is NOT normal, not even close to what normal svn speeds are. You should be questioning who's managing your svn server/repos and what the hell that server is running. Does it have 1 gig ram or something sickling? No clue why the answer states that what you've detailed us is normal because it's not. Only in poorly run dev teams or lack of maintenance of your svn repo is the cause. It is not acceptable. May 12, 2011 at 17:26
  • If it helps s.o. looking for a simular issue: my setup was very painfull slow as well: win7, eclipse, visualsvn. After changing the JavaHL to the native Win-implementation it was lightspeed rocket fast. Aug 28, 2015 at 10:31

9 Answers 9

59

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)

5
  • 1
    I don't get it. I have worked with Tortoise SVN for 3-4 companies and never have I seen it this slow and we had projects that were 1 gb! I am shocked that I'm seeing threads like these now that I'm at a new company and it's taking me hours to download a 300mb .NET project. May 12, 2011 at 16:00
  • 1
    Yet another company where it's slow...wtf v1.6 but I've seen v1.6 be much faster than this at other companies. Mar 27, 2013 at 15:38
  • 1
    Four years on from the most recent comment and guess what? SVN is still painfully slow. I work with a large project of about 2-3GB and many, many directories. I've just resigned to the fact that I can't do a "commit" or "update" on the entire project. It has to be done in chunks- roughly I have to divide into about 10 sub folders. Update I can sometimes get away with, because I guess it doesn't grab so many locks. Oct 12, 2017 at 16:09
  • It must just depend on the structure of the project and numbers of tiny files. Where I work we have projects upwards of 17 GB and they update / commit fine. :/
    – vdwtanner
    Nov 29, 2017 at 2:59
  • 2
    Persuade your company to migrate to Git for god's sake
    – Dev_NIX
    Sep 26, 2018 at 8:43
20

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.

4
  • 2
    I had the same issue several times and in my experience it's been the Recycle Bin that's been the culprit. Jan 5, 2010 at 15:46
  • 1
    Recycle bin can't have an effect on checkout performance though Sep 30, 2010 at 9:05
  • I'm on TortoiseSVN 1.7.6 and revert remains painfully slow, but my recycle bin is slow - I always use shift-delete to delete without recycling. I just changed Tortoise to deactivate: Settings Dialog->Dialogs 1->"Use recycle bin when reverting". I'll bet it will help! Thank you! Jul 10, 2012 at 14:53
  • The link is (effectively) broken. It redirects to the home page, nabble.com. Dec 18, 2016 at 21:47
11

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
  • 3
    Same problem in my case, removing "auth" folder really helps. Aug 15, 2014 at 14:55
  • 3
    This really saved my day. Aug 28, 2015 at 8:00
  • 4
    For me on windows 10 it was at C:\Users\UserName\AppData\Roaming\Subversion\auth Oct 25, 2015 at 8:14
  • 1
    %APPDATA% normally expands to "C:\Users\UserName\AppData\Roaming"
    – DarkFranX
    Jul 30, 2018 at 14:04
7

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

1
2

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

1

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.

1
  • Are all users sharing a machine? Or it happens on each user's workstation?
    – Avi
    Jun 4, 2009 at 10:02
1

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.

1

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.

0

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.

1
  • 2
    It can't have anything to do with the database backend, because reverting a file is a local-only operation. SVN doesn't check out files one at a time either, instead it operates on trees of files. Jun 4, 2009 at 18:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.