Skip to content

Remove the size limit on the compiled pattern cache - #16

Merged
vzakaznikov merged 1 commit into
testflows:masterfrom
CarlosFelipeOR:fix-compile-pattern-cache
Oct 22, 2026
Merged

vzakaznikov merged 1 commit into
testflows:masterfrom
CarlosFelipeOR:fix-compile-pattern-cache

Conversation

@CarlosFelipeOR

Copy link
Copy Markdown
Contributor

Fixes #15

Contributor License Agreement

For more information see https://github.com/testflows/TestFlows/blob/master/CONTRIBUTING.md.

You can electronically sign the CLA inside your first pull request using CLA Assistant by reading the CLA
and, when requested, sign it by adding a comment containing the following text.

I have read the CLA Document and I hereby sign the CLA

I, the Contributor, have agreed to and signed the CLA.

Description of Changes

Remove the size limit on the _compile_pattern cache in testflows/_core/name.py. Fixes #15.

Each step matches every live xfails/ffails pattern twice. Above 128 live patterns, the 256-entry LRU misses on every lookup and steps get about 5x slower. With maxsize=None, the repro from #15 runs 2000 steps in 0.99 s instead of 4.8 s. Test results don't change, because the cache memoizes a pure function.

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 testflows#15
@vzakaznikov
vzakaznikov merged commit 6aa4bd9 into testflows:master Oct 22, 2026
1 check failed
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Steps get about 5x slower when more than 128 xfails/ffails patterns are live

2 participants