Repository navigation
Blink: add a stream version, to share work between rules - #279
Merged
Merged
Conversation
Every write to the stream now changes its version. Three rules share one symbol scan while the file is unchanged, and eight rules skip a second render when nothing changed. The output is the same. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gnutix
force-pushed
the
perf/stream-version
branch
from
November 4, 2026 17:37
bf3921d to
5d497d3
Compare
Member
|
Thank you 👍 What was the prompt you made this with? |
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.
Problem: NativeFunctionInvocation, NativeConstantInvocation and GlobalNamespaceImport each build the same
symScan. Eight rules render the whole file twice, only to report whether they changed it.Change:
Streamgets a version that every write changes (writing the same value doesn't), andMemo, which caches a value until the version changes. The three rules share onesymScan. The eight rules skip the second render when the version didn't change.Result: these 11 rules on a private 8.8k-file codebase: 5.4 s → 4.0 s of CPU.
Tests: new tests for
VersionandMemo. Existing tests pass, and the private codebase still has 0 diffs. On 28k files with 18.5k diffs, main and this branch give the same output.🤖 Generated with Claude Code
https://claude.ai/code/session_01Y1vvcRhpVMjWLC4U5j78Xp