martinvonz added a comment.

  In https://phab.mercurial-scm.org/D4039#63460, @yuja wrote:
  
  > >   This doesn't seem like the right way to cache it. Suggestions?
  >
  > Suppose the cache exists mainly for templating, templatefuncs.shortest()
  >  can pass in a cached revset to resolvehexnodeidprefix(), and we don't have
  >  to take care of cache invalidation.
  
  
  Yep, it's pretty much only for templating, so that's a good suggestion. I'll 
start working on that. Thanks!
  
  > If we want to cache a prefix tree, maybe it could be turned into a 
"resolver"
  >  object which the templater creates at the first shortest() call.
  
  I have a stack of changes that make the nodetree struct a Python type that 
can be used for this. I might clean that up and send it another day. I'll try 
to follow your advice here then (I don't know what a resolver is yet, but I'll 
figure that out later).

REPOSITORY
  rHG Mercurial

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

To: martinvonz, #hg-reviewers
Cc: yuja, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to