Repository navigation
Reuse validated rg output transactions in matcher results - #1127
Merged
Merged
Conversation
This was referenced Nov 7, 2026
This was referenced Nov 7, 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.
Reuse each file's validated rg output as the matcher result instead of replaying and copying it. This reduces allocation traffic and improves large-output workloads while preserving native callback behavior, late-error handling and binary suppression. Ordinary whole-command search controls remain effectively unchanged.
AG;DR
Implementation and boundaries
RenderRgOutputreturns the owned per-file output transaction and selection state.ParallelMatchtransfers its existing reusable result allocation into rendering and takes the validated transaction back, avoiding the outer replay/copy and unused rg record-end storage.Evidence and limits
docs/benchmarks/transactional-rg-records-20261107.mdand.json.gz(5,079,513 bytes; SHA-256f32ec19cd3af284576a8f6af7e84fbedbf10dee48b044bfdc05909e0ffc7c466). The archive preserves all three variants, counterexamples, copied-image controls and complete source/raw/log records; no experimental runtime variant other than the selected native-in-place form enters this PR.c95140674254c371844f1fab27a64951a80dac55, not sanitizer timing or current release distributions. Lean images grow +2,816 bytes on Mac and +11,240 on Linux. Mac timings are unpinned; Linux uses pinned physical-core-separated logical CPUs. No native RSS improvement is claimed.Documentation and publication
filesmapping for the exact gzip download. Add only its precise large-file exception, preserving all existing report/history entries. This adds about 5.08 MB per rendered release snapshot; no historical performance data is removed.Validation and dependencies
The isolated development candidate passed all 323 documented core/registered-extension release targets on both hosts, including required real Linux FUSE, plus four focused canonical ASan targets per host. Source/evidence identities and all record hashes are preserved independently of public PR readiness. No local clang-tidy is run, as explicitly requested by the user.
Current integration is based on merged #1126/main
d8cf61cccd4b0efed5058bf6fa45228e47162b48; five C++ source/test files and the frozen report/evidence were preserved byte for byte while adding publication metadata. Current-base integration passed the three optimized semantic targets (rg_test,parallel_match_test,evaluate_test); these cached results were accepted only after exact input verification. The exact twelve-file changed-file pre-commit gate passed withSKIP=clang-tidy; all 32 release-site unit tests, supported files/page configuration, precise allowlist positive/negative controls and diff checks passed without altering the staged bytes. O22c2h tracking is marked integrated; its own PR CI remains required. Normal signed commitc4d21aea2f6640386d49c4a2f66503472bd64f96and normal push succeeded; its GPG signature verifies as good. At the initial publication this private clone had no automatic commit/push hooks configured, so the exact manual changed-file gate above is the initial local hook validation claimed. The later scoped Trunk formatter initialized its configured Git hooks; the subsequent signed Markdown correction and push ran those hooks successfully. No hook was disabled or bypassed. This PR must pass its own exact pushed-head GCC, coverage, sanitizers, CI clang-tidy, final benchmark aggregate and required checks; archived experiment results do not replace them. The four unqualified historical worker PRs #992/#996/#997/#998 remain untouched and are not dependencies.CI Trunk identified one extra blank line between performance-analysis sections on the initial head. Follow-up signed commit
92469874d258200a1e07fcbabcc9c8b150602294removes that single blank line; scopedtrunk fmtrecheck and changed-file pre-commit passed. All C++ source, tests, report and compressed evidence bytes remain unchanged. Healthy reachable collectors were not cancelled; the updated head requires its own CI.CI clang-tidy then identified three narrow source issues. The follow-up keeps the selected native buffer and record-boundary vector local, makes the unused non-publishing specialization's boundary vector const, accumulates already-computed boolean matches with
|=, and removes redundant typed-lambda parentheses. Fresh Mac development checks passedrg_test,parallel_match_test, andexpression_allocations_test(three executed tests); scoped formatting, changed-file hooks with explicit local clang-tidy skip, and normal signed commit/push hooks passed. The immutable experiment archive still describes the original measured source; no byte-identical performance claim is made for this style correction. Fresh pushed-head CI, including actual CI clang-tidy, remains authoritative. No healthy collector was cancelled.