This is a proof of concept for further discussion.
Details
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Event Timeline
Do you have performance numbers to share? Substantial wins would definitely pique my interest :)
For the NetBSD repository, a trivial test with the new cache:
time hg log -r '1000~-400' -T {node} > /dev/null real 0m1.898s time hg log -r '1000~-400' -T {node} > /dev/null real 0m0.170s time hg log -r '1000~-1' -T {node} > /dev/null real 0m0.166s time hg log -r '440000~-1' -T {node} > /dev/null real 0m0.170s
First one includes the time to initially warmup the cache.
Without the cache:
time hg log -r '1000~0' -T {node} > /dev/null real 0m0.196s time hg log -r '1000~-1' -T {node} > /dev/null real 0m0.825s time hg log -r '1000~-2' -T {node} > /dev/null real 0m1.288s time hg log -r '1000~-400' -T {node} > /dev/null real 3m23.201s time hg log -r '440000~-1' -T {node} > /dev/null real 0m0.182s
In other words, building the cache is amortised by one or two queries for children early up in the tree. The cache still provides a good benefit nearer to tip.
Perhaps we'd want this to not be specifically for revsets? We could also write to it when we write to the changelog to keep it up to date.
If we have one, we'll want it to be generic (so also for changelog). Do we have performance number of the time it takes to build it ?
Yes, it's still a POC. I wanted to make sure that it works in the modern world, but I am still considering the idea in the context of larger changes for transactional caches.
The approach used by the nodemap is probably a good way forward for transactional case. Some kind of happen only index, that get recompacked on a regular basis. Combined with an append only data file (for example, children can be stored as linked list (data file size) with a pointer to the first entry in an index file.
There seems to have been no activities on this Diff for the past 3 Months.
By policy, we are automatically moving it out of the need-review state.
Please, move it back to need-review without hesitation if this diff should still be discussed.
:baymax:need-review-idle: