Repository navigation
Encode short ASCII text directly in SDK CBOR frames - #2040
Merged
Merged
Conversation
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.
Write ASCII strings of up to 23 bytes directly into the SDK CBOR writer. These strings fit both their length and major type in one header byte. Field names, record paths and short values avoid a temporary UTF-8 allocation and copy. Longer strings and Unicode use the existing encoder. The scratch buffer follows the existing wipe path for secret-bearing messages.
Refs #1916
The checked-in contract pagination test failed at the stale-cursor assertion against
865443584and passed against the sprint baseb723b6c4e. Commit318ddf2echad already restored the view-version check. The test covers a continuation before a write, a confirmed write outside the result set, rejection withinvalid_request/cursor_stale, and successful pagination after restarting.Browser measurements
Headless Chromium 157.0.8103.38 on Linux. A dedicated worker per revision encoded preconstructed SDK query-response frames with IDs, hashes, paths, status, type and frontmatter (including Unicode tags). Each page transferred its independently owned CBOR buffer via postMessage. The main thread decoded the frame and hydrated the SDK query result. The timer includes request scheduling and delivery. It excludes fixture creation, replica execution and network I/O. Delivery includes browser scheduling and increased in the 10,000-row run.
Three warm-up pairs and 12 measured pairs alternated A/B and B/A. Each 10,000-row read used ten sequential 1,000-row pages. Each small-control sample averaged 20 complete 100-row reads. The table uses the middle two values for the median and nearest-rank p95. Phase percentiles are independent.
Verification
pnpm ci:localpassed all gates through build and typecheck. Its workspace test gate reported an Editor focus assertion on Node 22 and an Editor move-notes assertion on Node 24. Both Editor files passed individually on Node 24. A full Node 24 repeat is running with CI's standard per-test retry and eight available CPUs.