WIP: dense CallSpec, lazy NodeKeywords, deferred TopRequest#14766
Draft
RonnyPfannschmidt wants to merge 1 commit into
Draft
WIP: dense CallSpec, lazy NodeKeywords, deferred TopRequest#14766RonnyPfannschmidt wants to merge 1 commit into
RonnyPfannschmidt wants to merge 1 commit into
Conversation
Experimental changes aimed at large parametrized suites (pytest-dev#619): store CallSpec2 as parallel tuples, derive NodeKeywords without eager marker dicts, and defer TopRequest until first use. Adds bench/collection_memory.py to measure RSS per collected item. Co-authored-by: Cursor AI <ai@cursor.sh> Co-authored-by: Cursor Grok 4.5 <grok@x.ai>
Member
Author
|
this one doesn't bring in enough win yet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CallSpec2densely as parallel tuples (_argnames/_values/_indices/_scopes) with tuplemarks, exposing dict-like views via_CallSpecMap.NodeKeywordslazy: derivenode.name, markers, function attributes, andcallspec.idon read instead of eagerly copying into a per-item dict.TopRequestuntil first access (None→ construct;Falsestill means cleared after a run).bench/collection_memory.pyto measure RSS delta per collected item.Local numbers (parametrized ints,
--collect-only)Test plan
python bench/collection_memory.py --counts 1000,10000,50000,100000pytest testing/test_mark.py testing/python/metafunc.py testing/python/fixtures.py::TestRequestBasic -q-kselectionNotes
Made with Cursor