-
Notifications
You must be signed in to change notification settings - Fork 15
perf: sub-100ms incremental rebuilds (466ms → 67-80ms) #644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+162
−15
Merged
Changes from 13 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
253e3a7
fix: db version warning, barrel export tracing, quieter tsconfig, Set…
carlos-alm 8e43e43
docs: soften EXTENSIONS/IGNORE_DIRS changelog wording
carlos-alm b60fbb7
fix: address review feedback — version check, Set mutation, barrel ed…
carlos-alm 54c6c18
refactor: replace vendor.d.ts with @types/better-sqlite3
carlos-alm 5eeb0dc
fix: resolve merge conflicts with main
carlos-alm 9b469df
fix: address Greptile review feedback
carlos-alm e3eb0e5
Merge branch 'main' into feat/dogfood-fixes-9.1-9.4
carlos-alm c3ccbdd
fix: preserve transaction argument types via inline inference (#640)
carlos-alm 4eceebd
Merge branch 'main' into feat/dogfood-fixes-9.1-9.4
carlos-alm 64c1565
perf: sub-100ms 1-file incremental rebuilds (466ms → 78-90ms)
carlos-alm 34d08ba
perf: scope node loading and skip filesystem scan for incremental builds
carlos-alm a6d8080
Merge branch 'main' into feat/dogfood-fixes-9.1-9.4
carlos-alm 95626eb
Merge branch 'main' into feat/dogfood-fixes-9.1-9.4
carlos-alm 7dd0fd6
Merge branch 'main' into feat/dogfood-fixes-9.1-9.4
carlos-alm 0878fd1
fix: align scopedLoad gate with loadNodes to prevent missing lazy fal…
carlos-alm 38165eb
fix: align drift detection and metadata persistence thresholds, remov…
carlos-alm eae0280
Merge branch 'feat/dogfood-fixes-9.1-9.4' of https://github.com/optav…
carlos-alm 4b633be
Merge branch 'main' into feat/dogfood-fixes-9.1-9.4
carlos-alm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loadNodesandscopedLoadloadNodesdecides to scope the query whenexistingFileCount > 20(line 579), meaning it only loads nodes from relevant files. However,scopedLoad— which controls whether the lazy SQL fallback is applied — uses a different gate:allNodesBefore.length < 5000(line 636).If
existingFileCount > 20(scoped load executes) but the scoped result happens to return ≥5000 nodes,scopedLoadisfalseandaddLazyFallbackis never called. In that state,nodesByNamecontains only the scoped subset but has no lazy fallback for global name lookups (resolveByMethodOrGlobal,supplementReceiverEdges). Nodes outside the scoped set become silently invisible, potentially dropping call/usage edges.The two gates should align:
In practice this is unlikely to fire (≥5000 nodes from ≤5 files + their direct imports is extreme), but the asymmetry is a latent correctness risk worth closing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed — refactored
loadNodesto return a{ rows, scoped }tuple so thescopedLoadflag is derived directly from whether the scoped SQL path actually executed, rather than re-deriving it with a separate (misaligned) threshold. This eliminates the latent correctness risk entirely.