Page MenuHomePhabricator

nodemap: also use persistent nodemap for manifest
ClosedPublic

Authored by marmoute on Apr 14 2020, 11:48 AM.

Details

Summary

The manifest as a different usage pattern than the changelog. First, while the
lookup in changelog are not garanteed to match, the lookup in the manifest
nodemap come from changelog and will exist in the manifest. In addition, looking
up a manifest almost always result in unpacking a manifest an operation that
rarely come cheap.

Nevertheless, using a persistent nodemap provide a significant gain for some
operations.

For our measurementw, we use hg cat --rev REV FILE on the our reference
mozilla-try. On this repository the persistent nodemap cache is about 29 MB in
side for a total store side of 11,988 MB

File with large history (file: b2g/config/gaia.json, revision: 195a1146daa0)

no optimisation:                             0.358s
using mmap for index:                        0.297s (-0.061s)
persistent nodemap for changelog only:       0.275s (-0.024s)
persistent nodemap for manifest too:         0.258s (-0.017s)

File with small history (file: .hgignore, revision: 195a1146daa0)

no optimisation:                             0.377s
using mmap for index:                        0.296s (-0.061s)
persistent nodemap for changelog only:       0.274s (-0.022s)
persistent nodemap for manifest too:         0.257s (-0.017s)

Same file but using a revision (8ba995b74e18) with a smaller manifest (3944829
bytes vs 10 bytes)

no optimisation:                             0.192s (-0.185s)
using mmap for index:                        0.131s (-0.061s)
persistent nodemap for changelog only:       0.106s (-0.025s)
persistent nodemap for manifest too:         0.087s (-0.019s)

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

marmoute created this revision.Apr 14 2020, 11:48 AM
marmoute updated this revision to Diff 21090.Apr 15 2020, 7:59 AM
marmoute updated this revision to Diff 21145.Apr 16 2020, 1:13 PM
Alphare accepted this revision.Thu, May 7, 8:52 AM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.