D4366: treemanifest: introduce lazy loading of subdirs
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Fri Aug 24 13:28:30 EDT 2018
indygreg added a comment.
I'm not sure how I feel about so many methods having the `if dir in self._lazydirs: self._loadlazy(dir)` pattern.
On one hand, action at a distance when it involves caching can be dangerous. And doing the lookup inline will avoid a Python function call.
On the other, it seems very redundant.
Overall I'm OK with the patch. I just feel like using a `collections.defaultdict` or implementing `__missing__` to automagically resolve missing keys might work out better. Do you think this is a reasonable request?
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D4366
To: spectral, #hg-reviewers
Cc: indygreg, mercurial-devel
More information about the Mercurial-devel
mailing list