manifest: increase lrucache from 3 to 4
During a commit amend there are 4 manifests being handled:
- original commit
- temporary commit
- amended commit
- merge base
This causes a manifest cache miss which hurts perf on large repos. On a large
repo, this fix causes amend to go from 6 seconds to 5.5 seconds.
strip: add faster revlog strip computation
The previous revlog strip computation would walk every rev in the revlog, from
the bottom to the top. Since we're usually stripping only the top few revs of
the revlog, this was needlessly expensive on large repos.
The new algorithm walks the exact number of revs that will be stripped, thus
making the operation not dependent on the number of revs in the repo.
This makes amend on a large repo go from 8.7 seconds to 6 seconds.
revlog: return lazy set from findcommonmissing
When computing the commonmissing, it greedily computes the entire set
immediately. On a large repo where the majority of history is irrelevant, this
causes a significant slow down.
Replacing it with a lazy set makes amend go from 11 seconds to 8.7 seconds.
histedit: hold wlock and lock while in progress
Currently, histedit acquires and releases lock and wlock several times during
its run. This isn't great because it allows other hg processes to come in and
change state. With this fix, lock and wlock are acquired and released exactly
once.
The change to test-histedit-drop.t is a minor implementation one -- the cache
is still correctly invalidated, but it just happens a little later and only
gets printed out because of the unrelated --debug flag.
i18n-pt_BR: synchronized with
06e118c097ff
templater: only recursively evaluate string literals as templates (
issue4103)
templater: fix escaping in nested string literals (
issue4102)
Before the templater got extended for nested expressions, it made
sense to decode string escapes across the whole string. Now we do it
on a piece by piece basis.