hg log slow in extremely large svncloned repositories

Create issue
Issue #66 resolved
David Watson created an issue

If I have hgsubversion enabled, hg log becomes very very slow on large repositories. It appears to be O(n) with regard to the number of revisions.

On large repo with 17000 revisions:

time hg --config extensions.svn=/path/to/hgsubversion log -l 1 > /dev/null

real 0m4.947s user 0m4.778s sys 0m0.169s

time hg log -l 1 > /dev/null

real 0m0.528s user 0m0.403s sys 0m0.125s

On a small repo (400 revisions):

time hg --config extensions.svn=/path/to/hgsubversion log -l 1 > /dev/null

real 0m0.141s user 0m0.092s sys 0m0.047s

time hg log -l 1 > /dev/null

real 0m0.078s user 0m0.047s sys 0m0.030s

This is on MacOS 10.5.6.

Comments (6)

  1. Augie Fackler repo owner

    Is this only for svncloned repositories, or all repositories?

    Note that there's no compelling reason for this change in behavior. I'd really like to see profiler output of what is going on here.

  2. David Watson reporter

    Only svncloned repos. If I rename .hg/svn to something else, it is as fast as having the extension disabled.

  3. David Watson reporter

    Ran profiler, attached results - profile.out is human-readable, profile.dat is the binary profiler dump.

    Looks like it's spending an awful lot of time in get_parent_svn_branch_and_rev.

  4. Augie Fackler repo owner

    This is probably a result of the wrapping of repo.tags in tag_repo.py. I'm not terribly interested in fixing this, since the tags implementation will change eventually to not be so braindamaged, but until then I'll at least leave this ticket open.

  5. Augie Fackler repo owner

    I think this ought to be fixed in current tip, although I lack any sufficiently large repos to actually notice. Someone please reopen if hgsubversion still causes large slowdowns.

  6. Log in to comment