Mercurial > hg
view CONTRIBUTING @ 31206:49e5491ed9bd
dirstate: track updated files to improve write time
Previously, dirstate.write() would iterate over the entire dirstate to find any
entries that needed to be marked 'lookup' (i.e. if they have the same timestamp
as now). This was O(working copy) and slow in large repos. It was most visible
when rebasing or histediting multiple commits, since it gets executed once per
commit, even if the entire rebase/histedit is wrapped in a transaction.
The fix is to track which files have been editted, and only check those to see
if they need to be marked as 'lookup'. This saves 25% on histedit times in very
large repositories.
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 | Sun, 05 Mar 2017 16:20:07 -0800 |
parents | a492610a2fc1 |
children |
line wrap: on
line source
Our full contribution guidelines are in our wiki, please see: https://www.mercurial-scm.org/wiki/ContributingChanges If you just want a checklist to follow, you can go straight to https://www.mercurial-scm.org/wiki/ContributingChanges#Submission_checklist If you can't run the entire testsuite for some reason (it can be difficult on Windows), please at least run `contrib/check-code.py` on any files you've modified and run `python contrib/check-commit` on any commits you've made (for example, `python contrib/check-commit 273ce12ad8f1` will report some style violations on a very old commit).