# HG changeset patch # User Gregory Szorc # Date 2016-01-06 04:52:34 # Node ID 37df458d60c22524b4323de7e82e3df5b566f450 # Parent cd2f691f20b8992e0b97e8b146639e82f58e270f util: remove outdated comment about construction overhead An old implementation of this class (possibly only in my local repo) allocated nodes in the cache during construction time, making __init__ slow for large cache capacities. The current implementation lazily grow the cache size, making this comment wrong. diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -540,10 +540,6 @@ class lrucachedict(object): we recycle head.prev and make it the new head. Cache accesses result in the node being moved to before the existing head and being marked as the new head node. - - NOTE: construction of this class doesn't scale well if the cache size - is in the thousands. Avoid creating hundreds or thousands of instances - with large capacities. """ def __init__(self, max): self._cache = {}