Issue #69 new

hg pull slower than hg clone by orders of magnitude

Bruno Reis
created an issue

When I clone a biggish Git repository, for instance, hg clone git+https://github.com/twitter/bootstrap.git, the process is relatively fast (a couple of minutes). However, whenever there's a modification in the remote repository and I run hg pull -u, I've literally waited for hours and the operation wouldn't finish.

Isn't it strange? I'd expect a simple pull, that would bring, say, 3 or 4 commits to my local repository, to be much, much faster than an initial clone, however the timings are the other way round!

Is it expected? Is it fixable and/or planned? Or is it something related to my setup, maybe? I'm running Mercurial 2.6 on Windows 8 Pro x64 installed through TortoiseHG, with the latest hg-git version. My Python's installation ("Portable Python") version is 2.7.3, and I installed dulwhich with easy_install, which gave me version 0.8.7.

Comments (10)

  1. Endan Wang

    I experienced the same issue. When I pull changesets from codeplex git repository, sometimes it just won't finish. Whenever that happens, I will not be able to pull again in subsequent attempts.

    I am using TortoiseHg 2.9, dulwhich 0.9.0 and python 2.7.5.

  2. James Mills

    So.... What I've noticed is that operations such as:

    ` hg clone git+ssh://...

    and subsequent pull and push are slow.

    Over HTTPS however they are quite quick.

    This is against github.com for example.

    So the question is is there some performance issues with hg-git with git+ssh?

  3. James Mills

    For Example:

    git+https:

    $ time hg clone git+https://github.com/therealprologic/jsonselect.gitdestination directory: jsonselect
    importing git objects into hg
    updating to branch default
    cloning subrepo conformance_tests/upstream from https://github.com/lloyd/JSONSelectTests.git
    Cloning into '/Users/s2092651/tmp/jsonselect/conformance_tests/upstream'...
    remote: Reusing existing pack: 219, done.
    remote: Total 219 (delta 0), reused 0 (delta 0)
    Receiving objects: 100% (219/219), 17.56 KiB | 0 bytes/s, done.
    Resolving deltas: 100% (71/71), done.
    Checking connectivity... done.
    37 files updated, 0 files merged, 0 files removed, 0 files unresolved
    
    real    0m6.747s
    user    0m0.834s
    sys 0m0.344s
    

    git+ssh:

    $ time hg clone git+ssh://git@github.com:therealprologic/jsonselect.git
    destination directory: jsonselect
    ["git-upload-pack 'therealprologic/jsonselect.git'"]
    Connection to github.com closed by remote host.
    importing git objects into hg
    updating to branch default
    cloning subrepo conformance_tests/upstream from https://github.com/lloyd/JSONSelectTests.git
    Cloning into '/Users/s2092651/tmp/jsonselect/conformance_tests/upstream'...
    remote: Reusing existing pack: 219, done.
    remote: Total 219 (delta 0), reused 0 (delta 0)
    Receiving objects: 100% (219/219), 17.56 KiB | 0 bytes/s, done.
    Resolving deltas: 100% (71/71), done.
    Checking connectivity... done.
    37 files updated, 0 files merged, 0 files removed, 0 files unresolved
    
    real    10m7.980s
    user    0m0.875s
    sys 0m0.362s
    
  4. Siddharth Agarwal

    That actually looks like a 10 minute timeout more than anything else. What version of dulwich are you using? 0.9.6 onwards have several fixes that make it work again with hg-git.

  5. James Mills

    I believe I'm using tha latest but I'll confirm tomorrow morning when I get in to work.

    cheers James

    James Mills / prologic

    E: prologic@shortcircuit.net.au W: prologic.shortcircuit.net.au

  6. yajo

    In my case, it's indeed slower, but only 1.77x times, not 100.

    $ time hg clone git+ssh://git@github.com/grupoesoc/sale_order_related_products.git
    destination directory: sale_order_related_products
    ["git-upload-pack '/grupoesoc/sale_order_related_products.git'"]
    importing git objects into hg
    updating to branch default
    10 files updated, 0 files merged, 0 files removed, 0 files unresolved
    
    real    0m3.040s
    user    0m0.193s
    sys 0m0.060s
    
    $ rm -R sale_order_related_products/
    
    $ time hg clone git+https://github.com/grupoesoc/sale_order_related_products.gitdestination directory: sale_order_related_products
    importing git objects into hg
    updating to branch default
    10 files updated, 0 files merged, 0 files removed, 0 files unresolved
    
    real    0m1.721s
    user    0m0.201s
    sys 0m0.042s
    
    $ rpm -q python-dulwich hg-git
    python-dulwich-0.9.6-1.fc20.x86_64
    hg-git-0.6.0-1.fc20.noarch
    
  7. Log in to comment