Repository navigation
perf: reuse consecutive fixed-style rollback snapshots - #1157
Merged
domgan-oai merged 1 commit intoSep 19, 2026
Merged
domgan-oai merged 1 commit into
domgan-oai merged 1 commit into
Conversation
domgan-oai
marked this pull request as ready for review
September 19, 2026 19:33
5 of 8 tasks
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.
Summary
Updating six changed fixed-key style declarations now takes one whole-style rollback snapshot for that host within a render checkpoint, matching the equivalent opaque style object's snapshot count. The six CSS declaration writes and binding-bag journal entries remain.
Tracks #1130 §2.6. This is an operation reduction; it does not close the remaining generic bundle or prospective metadata regressions.
Changes
stylesnapshot within the current checkpoint, with at most one hop over the current binding bag's four-slot journal record.ci:workflow:test.Evidence
Matched against base
0b48d5d0723b669eee1a903fcefe99f2a88de4f9, using the same compiler, frozen consumer inputs, lockfile, Node 24.19.0, and esbuild 0.28.1:The checked-in report is
benchmarks/scoped-signals/fixed-style-journal.md. This is a source-selected public-compiler/esbuild Chromium proof, not a Vite/Rspack build or CPU improvement claim.Validation
pnpm run ci:workflow:test: 214/214, 13 suites, including both new operation guards.pnpm sync;git diff --check.pnpm test,pnpm typecheck, andpnpm format:checkwere not run locally.a11c32dd9796c33bf8940c758cbb38e789918399; PR is ready and mergeable.Risk / follow-up
Snapshot reuse is deliberately bounded to the journal tail and current checkpoint; it never combines declarations or changes coercion order. The checkpoint omission has no established public failing mutant because authored component bodies are entered after a
JOURNAL_RENDERbarrier. No claim is made that this eliminates all style journaling or unused-signal metadata cost.Provenance
agent-authored)Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Medium Risk
Changes transition-journal rollback for inline style updates in the client runtime; behavior is tightly scoped but affects DOM restoration on abandoned renders and errors.
Overview
Reuses one whole-
stylerollback snapshot when multiple fixed-key inline declarations update the same element in a single render checkpoint, instead of snapshotting the live attribute on every declaration (e.g. six snapshots → one, matching an opaquestyle={object}control). Declaration writes and binding-bag journal entries are unchanged.In
setStyleProperty, transition journaling now inspects the journal tail: it may skip a redundantjournalAttr(el, 'style')only when the immediately prior record is the same host and'style'within the current checkpoint (optionally stepping back one current-scopeJOURNAL_BAGslot). Other hosts, intervening writes, earlier checkpoints, coercion order, staged DOM, and abandoned/suspended renders stay isolated.Adds a fixed vs opaque operation guard (
benchmarks/scoped-signals/fixed-style-journal.*) wired intoci:workflow:test, a benchmark write-up, an octane patch changeset, and a public rollback suite (style-transaction-rollback.test.ts) for suspense, coercion failures, reentrancy, SSR hydration, and view-transition preparation.Reviewed by Cursor Bugbot for commit a11c32d. Bugbot is set up for automated code reviews on this repo. Configure here.