# HG changeset patch # User Gregory Szorc # Date 1452055954 28800 # 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 -r cd2f691f20b8 -r 37df458d60c2 mercurial/util.py --- a/mercurial/util.py Wed Jan 06 06:37:34 2016 +0000 +++ b/mercurial/util.py Tue Jan 05 20:52:34 2016 -0800 @@ -540,10 +540,6 @@ 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 = {}