2

curious which source repo is more effecient in terms of using server resources, git or svn?

raphink
  • 11,337
  • 6
  • 36
  • 47
user2659
  • 1,152
  • 4
  • 20
  • 32

1 Answers1

5

If you mean saving resources on your repository server, I would say DVCS in general (git, bzr, hg, etc.) are more efficient because there's more operations that can be done locally.

For example, with DVCS, you can easily merge branches on your development machine and then commit the result to the repository machine, while a centralized VCS (such as CVS or svn) will have to do the merge on the repository machine, thus using more resources on it.

When it comes to disk resources, I find git and bzr more efficient also because CVS and svn put versionning info at each level of the tree (CVS dirs in the case of CVS, .svn dirs in the case of svn) while git and bzr use only one directory (.git or .bzr) at the top of the tree, which is more efficient in terms of disk space.

raphink
  • 11,337
  • 6
  • 36
  • 47
  • 1
    Debatable. I don't think you can say a single .git directory is better than several .svn directories in terms of disk *space*. It's cleaner, sure, but not guaranteed to have a smaller footprint. As for the resources of the merge: I don't think that a merge will add up to a significant load on your box, but then, I don't host vast repositories... – wzzrd Dec 16 '09 at 20:26
  • My experience with svn and git/bzr was that having a single .git/.bzr directory actually made it smaller usually, and also much faster when it came to duplicating repositories (it's easier to analyze one directory than a whole tree recursively). As for the merge, I administrate a forge with 500+ repositories sometimes up to 8GB of data, and tags/merges on such projects are killing the machine so much that migrating to bzr has become a priority for us. – raphink Dec 16 '09 at 22:36
  • 3
    @wzzrd -- Based on my limited use of svn, I'd say the overhead of all the extra files really adds up. The consumption of inodes alone is a waste of resources, plus the slack wasted on all those extra files. For grins, I checked out the SAMBA_3_0 branch, and of the 6593 file/directory entries under that tree, 4239 (64%) are under a .svn directory. I stripped out the .svn directories, then initialized a git repo on the sources. Even before a "git repack" the svn repo was about 50% heavier in both file count and space usage than the git repo. Nothing against svn, but it is heavier than git. – Geoff Fritz Dec 17 '09 at 02:13
  • @Geoff What about the server repository? – WhyNotHugo Nov 22 '10 at 20:00