RFC: bitmap storage for precursors and phases
Jun Wu
quark at fb.com
Sat Feb 18 03:51:28 UTC 2017
Excerpts from Stanislau Hlebik's message of 2017-02-17 16:06:33 +0000:
> This is implementation of two caches (nonpublic + precursor) using
> serialized sorted lists and sets
> https://bitbucket.org/stashlebik/hg/commits/99879579ac2848a2567810b677d8344150a7b319?at=hiddenbitmaps_lists
I had a quick look. Here are my suggestions:
1. Prefer caching at a lower-level, so they get more widely used.
Practically, do not change localrepo.py, change phasecache.py and
obsolete.py instead.
I happened to do some refactoring in phasecache [1]. I'll send a V2 soon,
since the change seems related.
Note: phasecache is some C code so you need some data to prove the change
is worthy.
2. The "Python set" serialization is already in repoview.py. Reuse it.
Maybe move "_writehiddencache" to scmutil, or a new simple class.
"tryreadcache" could be changed and then moved.
Then the functions could be reused in obsolete.getrevs.
[1]: https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-February/092817.html
More information about the Mercurial-devel
mailing list