Batch mutable stylesheet publication - #315
Merged
Merged
Conversation
Collaborator
Author
|
Required review amendment is pushed as
Focused validation:
|
wieslawsoltes
force-pushed
the
fix/batched-stylesheet-publication-297
branch
from
September 17, 2026 19:16
bc37dbb to
fe4bba7
Compare
75 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.
Repeated
CSSStyleSheet.insertRule/deleteRulecalls rebuilt and published the owning<style>source after every mutation. In the unchanged Code OSS theme continuation, that repeated work held a required promise checkpoint for seconds and delayed the remote extension-host initialization send.This change keeps the live CSSOM wrapper and synchronous observable behavior, stages one final serialized source per stylesheet owner, and materializes it before observable style/layout reads or the checkpoint boundary. A first source larger than the 32 MiB coalescing budget takes an immediate nonqueued path, so pending storage stays bounded. It also preserves staged state across disconnect/reconnect, clears it on direct text replacement/navigation/teardown, and accounts for retained wrappers/source text in runtime memory metrics.
Closes #297.
Validation
486e7931; merged head wasfe4bba7d. The exact-head Linux runner passed the runtime browser compatibility step, and Node 24.18.1 CSSOM compatibility passes 8/8.sync → microtask → timerordering. The oversized-source regression also passes low-memory cleanup.b69f931d: exact remote root/provider, 5 resolved children, 5 Explorer model children, 5 rendered rows; resolve 97.582 ms, first child 1,487.051 ms, Ready→Initialized 759.817 ms, init send→native WebSocket entry 374.573 ms. The no-candidate control was 5,215.651 ms Ready→Initialized and 3,309.197 ms send→entry.Scope boundaries
This PR does not claim #299's separate Monaco rendered-text defect or close #252's broader workspace/provider surface. Whole-package RSS also remains above the 750 MiB release budget. A same-package A/B shows that budget failure predates this change and the candidate changes peak/retained RSS by only +0.15%/+0.25%; AppScene#42 owns the per-process memory follow-up.