This revision was automatically updated to reflect the committed changes.
Closed by commit rHGee087f0d7db5: util: allow lrucachedict to track cost of
entries (authored by indygreg, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
lothiraldan added inline comments.
INLINE COMMENTS
> indygreg wrote in util.py:1277
> Good catch! I'll send a revised patch.
>
> FWIW, cost accounting on this data structure opens up a lot of potential
> around caching on revlogs. I have some alpha-quality commits to replace the
> full
indygreg updated this revision to Diff 10832.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D4502?vs=10821=10832
REVISION DETAIL
https://phab.mercurial-scm.org/D4502
AFFECTED FILES
contrib/perf.py
mercurial/util.py
tests/test-lrucachedict.py
indygreg planned changes to this revision.
indygreg added inline comments.
INLINE COMMENTS
> lothiraldan wrote in util.py:1277
> I'm not sure this line is tested, I didnd't see a test where we replace an
> entry with an associated cost
Good catch! I'll send a revised patch.
FWIW, cost
lothiraldan added inline comments.
INLINE COMMENTS
> util.py:1277
> if node is not None:
> +self.totalcost -= node.cost
> node.value = v
I'm not sure this line is tested, I didnd't see a test where we replace an
entry with an associated cost
REPOSITORY
rHG
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
Currently, lrucachedict allows tracking of arbitrary items with the
only limit being the total number of items in the cache.
Caches can be a lot more useful