diff --git a/CHANGES.rst b/CHANGES.rst index 787826b..10b451f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,16 @@ Changelog ========= +1.3.3 - 2025-??-?? +------------------ + +- Revert the usage of ``lru_cache`` as that isn't being hit as expected, + and that the benefits it brings is too negligible to bring back given + the extremely limited cache hits. [ + `#45 `_ + `#46 `_ + ] + 1.3.2 - 2024-10-17 ------------------ diff --git a/src/calmjs/parse/unparsers/walker.py b/src/calmjs/parse/unparsers/walker.py index 25d4826..a08d1e8 100644 --- a/src/calmjs/parse/unparsers/walker.py +++ b/src/calmjs/parse/unparsers/walker.py @@ -6,14 +6,6 @@ from __future__ import unicode_literals -try: - from functools import lru_cache -except ImportError: # pragma: no cover - def lru_cache(*a, **kw): - def wrapper(f): - return f - return wrapper - from calmjs.parse.asttypes import Node from calmjs.parse.ruletypes import Token from calmjs.parse.ruletypes import Structure @@ -162,7 +154,6 @@ def __init__( self.__optimized_definitions = self.optimize() - @lru_cache(maxsize=None) def optimize_definition(self, name, definition): rules = [] for rule in definition: