D5170: branchmap: pass changelog into revbranchcache.branchinfo()

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Sat Oct 20 03:19:39 EDT 2018


yuja added a comment.


  >   ! wall 0.133497 comb 0.140000 user 0.130000 sys 0.010000 (best of 64)
  >   ! wall 0.139459 comb 0.150000 user 0.150000 sys 0.000000 (best of 57)
  >   
  >   After
  >   ! wall 0.106518 comb 0.110000 user 0.100000 sys 0.010000 (best of 77)
  >   ! wall 0.106157 comb 0.110000 user 0.100000 sys 0.010000 (best of 83)
  
  I'm surprised that `unfilteredrepo.changelog` is also slow.
  
  > - a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -2037,8 +2037,9 @@
  > 
  >   if full: rbc = self.revbranchcache() +            cl = self.changelog
  
  Perhaps it has to be self.unfiltered().changelog because revbranchcache is
  initialized with the unfiltered repo.
  
  >   for r in self.changelog:
  > 
  > - rbc.branchinfo(r) +                rbc.branchinfo(r, changelog=cl)
  
  Can't we just make revbranchcache keep repo.changelog reference? It doesn't
  make sense to pass in repo.changelog as an argument, whereas the repo is
  held by revbranchcache.

REPOSITORY
  rHG Mercurial

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

To: pulkit, #hg-reviewers
Cc: yuja, mercurial-devel


More information about the Mercurial-devel mailing list