D6259: [POC] revset: on-disk cache for children queries

joerg.sonnenberger (Joerg Sonnenberger) phabricator at mercurial-scm.org
Wed Apr 17 08:54:41 EDT 2019


joerg.sonnenberger added a comment.


  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.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6259

To: joerg.sonnenberger, #hg-reviewers
Cc: indygreg, mercurial-devel


More information about the Mercurial-devel mailing list