Skip to content
Snippets Groups Projects
  • Siddharth Agarwal's avatar
    f7f8159c
    ancestor: add lazy membership testing to lazyancestors · f7f8159c
    Siddharth Agarwal authored
    This also makes the perfancestorset command use lazy membership testing. In a
    linear repository with over 400,000 commits, without this patch, hg
    perfancestorset takes 0.80 seconds no matter how far behind we're looking.
    With this patch, hg perfancestorset -- X takes:
    
        Rev X       Time
           -1      0.00s
        -4000      0.01s
       -20000      0.04s
       -80000      0.17s
      -200000      0.43s
      -300000      0.69s
            0      0.88s
    
    Thus, for revisions close to tip, we're up to several orders of magnitude
    faster. At 0 we're around 10% slower.
    f7f8159c
    History
    ancestor: add lazy membership testing to lazyancestors
    Siddharth Agarwal authored
    This also makes the perfancestorset command use lazy membership testing. In a
    linear repository with over 400,000 commits, without this patch, hg
    perfancestorset takes 0.80 seconds no matter how far behind we're looking.
    With this patch, hg perfancestorset -- X takes:
    
        Rev X       Time
           -1      0.00s
        -4000      0.01s
       -20000      0.04s
       -80000      0.17s
      -200000      0.43s
      -300000      0.69s
            0      0.88s
    
    Thus, for revisions close to tip, we're up to several orders of magnitude
    faster. At 0 we're around 10% slower.
test-ancestor.py.out 1.22 KiB