[PATCH 8 of 8] annotate: simplify annotate parent function

Matt Mackall mpm at selenic.com
Mon Jun 3 15:50:30 CDT 2013


On Fri, 2013-05-31 at 10:19 -0700, Durham Goode wrote:
> # HG changeset patch
> # User Durham Goode <durham at fb.com>
> # Date 1369967343 25200
> #      Thu May 30 19:29:03 2013 -0700
> # Node ID 73654634246ac92ee61438eea2d50aab8565c75e
> # Parent  7578ad45e1d323e90abd12ad024939e9703aa882
> annotate: simplify annotate parent function
> 
> The annotate algorithm used a custom parents() function to try to reuse
> filectx and filelogs. I got rid of all the caching bits and just use the
> normal filectx.parents() and found that the performance did not change
> when running hg blame on a file with 5000 revisions (22 seconds before
> and after my change).

The existing logic is to avoid bad behavior on files that have lots of
merges and renames in their history. If your test isn't switching back
and forth between different filelogs as it goes, it doesn't tell us
much.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list