Mercurial > hg
comparison mercurial/diffhelpers.c @ 31278:1c97a91a18dc
dirstate: track otherparent files same as nonnormal
Calling dirstate.setparents() is expensive in a large repo because it iterates
over every file in the dirstate. It does so to undo any merge state or
otherparent state files. Merge state files are already covered by
dirstate._nonnormalset, so we just need to track otherparent files in a similar
manner to avoid the full iteration here.
Fixing this shaves 20-25% off histedit in large repos.
I tested this by adding temporary debug logic to verify that the old files
processed in the loop matched the new files processed in the loop and running
the test suite.
author | Durham Goode <durham@fb.com> |
---|---|
date | Wed, 08 Mar 2017 17:35:20 -0800 |
parents | f1c127df7c4f |
children | 2f51f4c535d2 |
comparison
equal
deleted
inserted
replaced
31276:cd29673cebdb | 31278:1c97a91a18dc |
---|