Repository navigation
perf: config build does less serial per-file work - #1519
Merged
Merged
Conversation
…ouping The config build's startup scan now carries each match's relative path from the walk worker that found it, instead of recomputing it serially, and streams early per-table hook rows into SQLite while the scanned files are grouped on a second thread.
This was referenced Oct 15, 2026
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.
Fixes #1483
Cuts the serial bookkeeping in the config-table build. Before this change, dirsql's CPU time on the frontmatter case was already about the same as
find + xargs -P. The gap came from work done one file at a time on a single thread.Found { path, rel_path, table_name }. Each walk worker builds the relative path for the files it matches (found_in), so the calling thread no longer recomputes it for every file.relative_pathis removed, andreconcile_scanno longer needs the anchors.finish_build_with_fsgroups the scanned files on a scoped thread (group_scanned) while the main thread inserts rows from the per-table hooks that started early (stream_early). Before, grouping ran first and the inserts waited behind it. Grouping also checks the last batch before searching the list.Not on the vtab/output path that #1513 changes.
Measurements
Corpus: 131072 notes. Paired, alternating runs; median ratio vs
find+xargs-P. The machine was shared with other agents, load 11-27.ab.py, 21 pairs, wall timefrontmatter_parse_speed_test(startup subtracted), ratioThe test's bar native (
find+awk) is unchanged, and the test still passes against it (ratio 0.185). It is not switched tobar=FASTEST, because that would leave the test red at 1.9x.Changelog / Migrations
packages/rust/changelog.d/packages/rust/migrations.d/E2E Verification
cargo test --workspace --features cli)packages/python/e2e-attestations/bot-1483-fm-speed-1015.jsonreceipt writtenpackages/ts/e2e-attestations/bot-1483-fm-speed-1015.jsonreceipt writtentesting-conventions e2e attest 'uv run python -m pytest tests/e2e/frontmatter_parse_speed_test.py tests/e2e/jsonl_parse_speed_test.py tests/e2e/on_file_query_test.py tests/e2e/fanout_test.py tests/e2e/declared_table_name_test.py tests/e2e/query_contract_test.py tests/e2e/use_case_notebook_test.py tests/e2e/use_case_transcripts_test.py tests/e2e/sigint_interrupt_test.py -x -q -s';just e2e-attest-ts