Repository navigation
Defer binary Blob string expansion - #890
Merged
Merged
Conversation
This was referenced Sep 21, 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.
Problem
The default WebSocket
binaryTypeisblob. WebScene copied each binary frame into a Blob, then eagerly expanded everyUint8Arrayelement into a comma-separated decimal string for its compatibilityBlob#toString()cache. Unchanged Code OSS never requests that string, but its startup management stream contains about 11.87 MiB of binary frames and accumulated 650–729 ms of same-socket queue delay.Change
Defer the existing Uint8Array string representation until a caller explicitly stringifies the Blob, in both top-level and child-frame implementations. Blob bytes are still snapshotted during construction, and explicit
String(blob)returns the same result. Other typed views retain their existing immediate coercion behavior.Add a release regression that constructs 48 × 262,144-byte Blobs, matching the observed 12 MiB startup workload, checks snapshot semantics, and compares construction with explicit expansion.
Validation
1,3,5,7Blob snapshotFull evidence is in
docs/validation/binary-blob-lazy-string-20260921.md.Fixes the identified binary-processing slice of #280. Product acceptance remains open until the exact package first-paint gate passes.