From cb0107b4b2d83fba26b4b02e14d0601f56f43aa0 Mon Sep 17 00:00:00 2001 From: CarlosFelipeOR Date: Thu, 22 Oct 2026 16:00:35 -0300 Subject: [PATCH] Remove the size limit on the compiled pattern cache Each step matches every live xfails/ffails pattern twice, so more than 128 live patterns overflow maxsize=256. The LRU then misses on every lookup and steps get about 5x slower. Fixes #15 --- testflows/_core/name.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testflows/_core/name.py b/testflows/_core/name.py index 5c37ceb..088b420 100644 --- a/testflows/_core/name.py +++ b/testflows/_core/name.py @@ -140,7 +140,7 @@ def matchcase(name, pat, prefix=False): return match(name) is not None -@functools.lru_cache(maxsize=256, typed=True) +@functools.lru_cache(maxsize=None, typed=True) def _compile_pattern(pat, prefix=False): res = translate(pat, prefix=prefix) return re.compile(res)