Boris Feld <boris.feld@octobus.net> [Tue, 20 Nov 2018 10:55:20 +0000] rev 40780
perf: add a `clear-revlogs` flag to `perfbookmarks`
This flag (off by default) makes it possible to enable the refresh of the
changelog and revlog. This is useful to check for costly side effects of
bookmark loading.
Usually, these side effects are shared with other logics (eg: tags).
example output in my mercurial repo (with 1 bookmark, so not a great example):
$ hg perfbookmarks
! wall 0.000044
$ hg perfbookmarks --clear-revlogs
! wall 0.001380
Boris Feld <boris.feld@octobus.net> [Tue, 20 Nov 2018 10:38:15 +0000] rev 40779
tags: cache `repo.changelog` access when checking tags nodes
The tags reading process checks if the nodes referenced in tags exist. Caching
the access to `repo.changelog` provides a large speedup for repositories with
many tags.
running `hg perftags` in a large private repository
before: ! wall 0.393464 comb 0.390000 user 0.330000 sys 0.060000 (median of 25)
after: ! wall 0.267711 comb 0.270000 user 0.210000 sys 0.060000 (median of 38)
Boris Feld <boris.feld@octobus.net> [Tue, 20 Nov 2018 10:46:20 +0000] rev 40778
perf: add a `clear-revlogs` flag to `perftags`
This flag (on by default) makes it possible to disable the refresh of the
changelog and revlog. This is useful to check for the time spent in the core
tags logic without the associated side effects. Usually, these side effects
are shared with other logics (eg: bookmarks).
Example output in my Mercurial repository
$ hg perftags
! wall 0.017919 comb 0.020000 user 0.020000 sys 0.000000 (best of 141)
$ hg perftags --no-clear-revlogs
! wall 0.012982 comb 0.010000 user 0.010000 sys 0.000000 (best of 207)
Boris Feld <boris.feld@octobus.net> [Sun, 25 Nov 2018 13:37:53 +0100] rev 40777
perf: stop creating new revlog by hand in perftags
It's better to let the repository logic create its own object. We now just clear
the cache. New object will be automatically created from there.