This is an archive of the discontinued Mercurial Phabricator instance.

reverse-branch-cache: switch to doubling allocating scheme
ClosedPublic

Authored by joerg.sonnenberger on Jan 14 2021, 8:19 PM.

Details

Summary

In preperation for updating the reverse-branch-cache incrementally
whenever a new changeset comes in, avoid bad performance on resize with
Python 3.7 (and likely other 3.x versions).

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

marmoute accepted this revision.Jan 18 2021, 11:08 AM
marmoute added a subscriber: marmoute.

This is clearer. For extra clarity I would probably use something like:

extendsize = (requiredsize * 2) - rbccur

This give about the same result but is simpler to read.

pulkit accepted this revision.Jan 21 2021, 6:22 AM
This revision is now accepted and ready to land.Jan 21 2021, 6:22 AM