Git and Mercurial - can someone explain this test result

I did a speed comparison for GIT and Mercurial.
I choose a large project of 9072 files (mainly php files and several images) of 95.1 MB in size.

This is a fake project and perhaps gives someone an idea on how to explain the results that I got - to download, without changes, and copy 12 times into two folders - one for GIT and another for the Mercury repository.

Then I create a GIT repository and commit (using TortoiseGIT), and upon completion, I did the same in another folder for Mercurial using TortoiseHG.

Git Results
Time: 32 minutes and 30 seconds to complete everything
Repository size: 6.38 MB, a total of 847 files.

Mercury results:
Time: 1 minute and 25 seconds - yes, only 1 minute.
Repository size: 58.8MB with 9087 files.

I am not saying that it’s best or something else, I’m just trying to understand the differences and how SCM created the repositories.

It seems that HG made a copy of the files with some kind of compression.
But I don’t understand what GIT did.
Can someone explain the results?

PS: I know that there are already several questions about GIT and Mercurial, I'm only trying to find out the result of this test - and even if it is a valid test. When I started, I only checked the speed, but I have some question marks on my head ...

+5
source share
3 answers

; hg git ( ) . GUI.

, git hg . Mercurial revlog , git . , git. ? , . , , DVCS . - rsync VCS - DVCS , . .

, ; . , git , ( wordpress - 2,7 , , tarball), . Mercurial , , , , , git, .

. Heres, git :

for dir in {1..100}; do
  mkdir $dir
  for file in {1..100}; do
    touch $dir/$file
  done
done
hg add {1..100}; hg commit -m tweedledee
git add {1..100}; git commit -m tweedledum

, 10000 100 . Git , . Mercurial, , , , 10140 .hg, 40 .

, :

mkdir -p a/b/c/d/e
for i in {1..1000}; do
  echo hello >> a/b/c/d/e/file
  hg add a; hg commit -m "Commit $i"
  git add a; git commit -m "Commit $i"
done

, . git , , . , git , . , 32 , 620K. Mercurial, , , .hg 396K .

? , , . , . .

, , , Git Internals in Pro Git, Mercurial wiki Mercurial Internals PyCon 2010, .

+18

DVCS , . , Git, Mercurial . , . , , ( ).

, Git , ( )... , ?

/, mpe.: D

+2

All Articles