[PATCH V2] copy: add flag for disabling copy tracing

Matt Mackall mpm at selenic.com
Wed Feb 4 15:45:16 CST 2015


On Tue, 2015-02-03 at 19:13 -0800, Durham Goode wrote:
> # HG changeset patch
> # User Durham Goode <durham at fb.com>
> # Date 1422386787 28800
> #      Tue Jan 27 11:26:27 2015 -0800
> # Node ID 94d5d878251d92e97b47339110848205e54eb960
> # Parent  e1dbe0b215ae137eec53ceb12440536d570a83d2
> copy: add flag for disabling copy tracing
> 
> Copy tracing can be up to 50% of rebase time when rebasing medium sized stacks
> of commits (~12 commits) in large repos (hundreds of thousands of files).
> This provides the option of turning off the majority of copy tracing. It
> does not turn off _forwardcopies() since that is used to carry copy
> information inside a commit across a rebase.
> 
> This will affect the situation where a user edits a file, then rebases on top of
> commits that have moved that file. The move will not be detected and the user
> will have to manually resolve the issue.
> 
> Once the lazymanifest work goes in, we can make this smarter by only disabling
> copy detection when we know all the target files exist in the destination (since
> we will be able to cheaply detect this with lazymanifest.diff).
> 
> This takes a 12 commit rebase from 70s to 45s. Future patches will bring this
> down further to 27s.

This is really similar to the existing merge.followcopies, which has
probably bit-rotted. It was put in when copy support was added to bypass
bugs/performance issues, but no one's said anything about copy
performance until quite recently.

Can you take a look at that? Also note its usage of configbool.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list