Mercurial > evolve
diff tests/test-evolve-inmemory.t @ 5778:84affb254cdf
evolvecmd: don't update working copy when using in-memory merge
This patch removes the update of the working copy after each in-memory
merge and only instead updates the working copy afterwards (if
requested).
There's still no significant speedup in the hg repo. It seems that the
cost of updating the working copy is not large enough to make much
difference, and the cost of reading and updating obsmarkers is
relatively high in that repo. A significant part of the time (~35%) is
spent in `repoview.computehidden()` because it is recalculated for
every commit (seems like potential for improvement).
I made similar changes in the mozilla-unified repo (which has a
significantly larger working copy), by adding 10 commits each changing
one line of a file. There, evolving 9 of those commits took 34s before
this patch and 20s after. I measured similar speedups in an internal
repo (9.0s -> 5.2s).
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 24 Nov 2020 16:33:24 -0800 |
parents | c5dfbbe4363d |
children | fd039a7f0c3c c1094cce56ed |
line wrap: on
line diff
--- a/tests/test-evolve-inmemory.t Thu Oct 15 15:40:36 2020 -0700 +++ b/tests/test-evolve-inmemory.t Tue Nov 24 16:33:24 2020 -0800 @@ -144,13 +144,43 @@ > precommit = echo "running precommit hook" > EOF The hook is not run with in-memory=force - $ hg evolve --config experimental.evolution.in-memory=force + $ hg co B2 + 3 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg evolve --config experimental.evolution.in-memory=force --update move:[3] C atop:[2] B2 - $ hg touch tip^ + working directory is now at 52da76e91abb + $ hg glog + @ 4:52da76e91abb draft tip + | C + | x 3:bc77848cde3a draft C + | | C + o | 2:377a194b9b8a draft B2 + | | B2 + | x 1:830b6315076c draft B + |/ B + o 0:426bada5c675 draft A + A + $ hg co tip^ + 0 files updated, 0 files merged, 2 files removed, 0 files unresolved + $ hg amend -m B3 1 new orphan changesets The hook is run with in-memory=yes - $ hg evolve --config experimental.evolution.in-memory=yes + $ hg next --config experimental.evolution.in-memory=yes move:[4] C - atop:[5] B2 + atop:[5] B3 running precommit hook + working directory is now at aeee7323c054 + $ hg glog + @ 6:aeee7323c054 draft tip + | C + o 5:908ce5f9d7eb draft + | B3 + | x 3:bc77848cde3a draft C + | | C + +---x 2:377a194b9b8a draft B2 + | | B2 + | x 1:830b6315076c draft B + |/ B + o 0:426bada5c675 draft A + A