Repository navigation
perf(pr-context): build the include-coupling table once per call, not once per changed file (~5.8x faster) - #395
Merged
Merged
Conversation
…probe cochangePartners built a whole-ingest StaticIncludeCoupling (buildPreciseIncludeAdj over every include) on EVERY call. Its only input is the ingest, so the multi-probe callers (--pr-context, --situ text and facts) rebuilt the same graph once per changed file, and --pr-context again per trim-ladder render pass: ~87% of a --pr-context=HEAD~30 run on ripwire. New CoCouplingCache holds one lazily-built coupling keyed on the ingest it was made for (EXPECTS on a mismatched ingest); the precomputed-sets overload takes an optional pointer to it, and writePrContext / writeSituation / computeSituationFacts pass one per call. Single-probe callers (CLI --cochange, MCP cochange) keep a one-off local cache. Output is byte-identical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
joyful-ii-V-I
pushed a commit
that referenced
this pull request
Oct 13, 2026
… lane/legendcov-speed Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 13, 2026
joyful-ii-V-I
pushed a commit
to lennix1337/ripwire
that referenced
this pull request
Oct 20, 2026
Version 0.6.7 -> 0.6.8 in CMakeLists.txt; the CHANGELOG [Unreleased] section becomes [0.6.8] - 2026-10-19 with a fresh empty [Unreleased] above it, a summary (two grading methods, 0.6.5 -> 0.6.7 -> 0.6.8, credits) and entries for the changes whose lanes merged without one (--for stops when complete + soft --token-budget, the owner body, the startup git check, --pr-context redhat-et#395, the dangling-reference fences). The closure/bridge "Fixed" entry, which fixed features that exist only in this release, is now an Added entry. The README gets the 0.6.8 release-notes paragraph, the "Latest" line and the Windows snippet version. No logic changes; kParserVer 198 / kCacheVersion 36 unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
--pr-contextrebuilt the static include-coupling table once per changed file, and again on every pass of its trim ladder. The table depends only on the ingest, so this was loop-invariant work: about 87% of--pr-context's time. Found while profilinglegendcoveragecheck(#394).The change: a lazily built
CoCouplingCacheinsrc/gitmine.h, keyed on the ingest, with anEXPECTSthat it is only used with that ingest.writePrContext,writeSituationandcomputeSituationFactsshare one cache per call; single-probe callers behave as before. Not changed: multi-root--pr-contextstill builds once per root.Output: byte-identical on all 49 argv:
--pr-contextat HEAD~1/~5/~30 on four repos (ripwire, hono, tmux, textual), budget variants,--situ,--cochange;--handoff, bare--situ, bare--pr-context;Speed:
--pr-context=HEAD~30on this repository went from 49.5/45.8 s to 8.7/7.7 s, two interleaved runs each, about 5.8× faster.Checks:
--quality-deltagates 0; prereview passes.🤖 Generated with Claude Code
Summary by CodeRabbit