perf: bound parallel import extraction and trim AST traversal - #61
Open
TristanKruse wants to merge 1 commit into
Open
TristanKruse wants to merge 1 commit into
TristanKruse wants to merge 1 commit into
Conversation
This branch has not been deployed
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
Stacked on #60; the base is
perf/selective-direct-dependencies, so this PR contains only the next extraction optimization and its tests. No public API, parser dependency, or new runner is introduced.Validation
git diff --checkpassed.ast.walkreference.Local performance gates
Eight randomized pairs per workload, Python 3.13 on the same Windows host, compared against #60 at
1a6d5ed. These are workload-specific medians, not universal speed claims. Filesystem caches were not flushed. Host load varied; absolute values must not be compared with earlier sessions.The library-only multi-rule measurements were uninstrumented. The generated corpus contains 5,005 Python files; the direct rule selects 1,251 source files. The small fresh-process results do not show a win and are included explicitly. This optimization does not eliminate process/test-runner startup cost or establish a cross-platform performance claim. Linux/macOS performance and very large individual-file memory behavior deserve follow-up measurement; the bounded window is a task-count limit, not a byte-level memory cap.
On the same ten-rule corpus, a one-run
tracemallocdiagnostic measured peak Python-tracked allocations of 10.21 MiB before and 11.06 MiB after (+0.85 MiB / 8.3%), with 7,494 violations in both variants. This is not total process RSS and does not include native thread-stack memory. The speed improvement has a small measured Python-allocation cost; it is not a memory-reduction claim.