Repository navigation
Conversation
Reuse a single graph snapshot for source checks and avoid building resolver context when no sources need AST work. Fixes Graphify-Labs#5527 Co-authored-by: Codex <[email protected]>
|
Thanks for the pull request, @rvitaliy. A maintainer will review it soon. Want to talk it through while it is in review? Come join us on our Discord server. For longer-form discussion there is also GitHub Discussions. A couple of things that speed up review: make sure the test suite passes on Python 3.11 and 3.13, and that the change keeps extraction deterministic. |
There was a problem hiding this comment.
Graphify review 
3 possible issues to check · High impact
Incremental extraction now loads the existing graph once and reuses it for stale-source checks and AST resolution context.
3 possible issues we couldn't confirm
- Incremental and full-scan runs now load the whole graph.json before the size cap is checked, so an oversized graph can exhaust memory ·
graphify/cli.py:4707 - The warm-run graph read check only counts Path.open calls on the exact resolved path, so a correct read can be missed and the test fails for ·
tests/test_extract_cli.py:1455 - The no-rewrite check compares modification times, which coarse filesystem timestamps can leave unchanged after a rewrite ·
tests/test_extract_cli.py:1473
They don't change the score.
What this review covered
- We didn't review 1 file that isn't source code, such as docs, config, images, or generated or third-party code.
- 3 of 3 changed files inspected. This is scope, not a correctness guarantee.
Code graph · 572 functions depend on this change
- 1 function became more coupled.
dispatch_command()(8 callers). - Gate, test list and every flagged function: in the Graphify check.
Reviewed 67917a9
Member
|
Shipped in v0.9.122, landed via authorship-preserving cherry-pick so your commits keep your name. Thanks @rvitaliy! |
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.
What does this PR do?
Reuse the saved graph snapshot for source pruning, recovery of manifest entries with missing output, and incremental AST resolution. An unchanged extraction skips building resolver context. Deletions and exclusions can still schedule surviving code for C++ forward-declaration and ID-collision reconciliation.
In a warm run over 5,152 unchanged inputs and a 65 MiB graph,
graph.jsonwent from three reads and JSON decodes to one. Instrumented read and decode time went from 0.82 s to 0.27 s in that sample. The run kept the saved graph intact.Verification & Invariants
How was this tested?
Pyright reports the same 782 diagnostics on the base and on this branch.
Fixes #5527