Skip to content

Improve JSON read compression and SSE serialization - #319

Merged
zerodrift merged 2 commits into
masterfrom
fix/json-read-transport-performance-20261118
Nov 18, 2026
Merged

zerodrift merged 2 commits into
masterfrom
fix/json-read-transport-performance-20261118

Conversation

@zerodrift

@zerodrift zerodrift commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Large curve, trading and Risk reads were sent without response compression, and SSE publication serialized an already serialized result again. Enable negotiated gzip for the named read routes and write validated result JSON directly into a UTF-8 SSE envelope. Keep event flushing, publication authorization, cancellation and size limits intact.

Validation: Release API/checks and Worker builds pass. The async-read checks pass, including new semantic parity, gzip/identity negotiation, readiness-before-stream-completion and bootstrap-exclusion checks. Independent adversarial review found no remaining blockers.

A matching-projection browser comparison also checked direct, uncompressed Protobuf:

Added RTT JSON + gzip p50 / p95 Protobuf p50 / p95 JSON / Protobuf downstream
0 ms 1,471 / 1,836 ms 1,716 / 2,108 ms 7.61 / 10.87 MiB
330 ms 1,986 / 2,107 ms 2,231 / 2,404 ms 7.62 / 10.92 MiB

Two complete isolated runs, six primary hydration observations per mode/profile; p95 is descriptive. The 72-contract curve includes 608 observations and workspace hydration. Timings include decoding, validation, managed display formatting and rendering. These comparison prototypes share a separate projection cleanup, so the table compares encoding choices rather than claiming this patch's before/after latency. Background shape-read work varies; measured curve/history/Risk request bodies and core command counts match. Workload, environment and limits are recorded under D428 in docs/verification.md.

@zerodrift
zerodrift force-pushed the fix/json-read-transport-performance-20261118 branch from 388ad95 to c6fd667 Compare November 18, 2026 19:09
Signed-off-by: zerodrift <zerodrift@users.noreply.github.com>
Signed-off-by: zerodrift <zerodrift@users.noreply.github.com>
@zerodrift
zerodrift force-pushed the fix/json-read-transport-performance-20261118 branch from 7419bef to b17c6ad Compare November 18, 2026 20:25
@zerodrift
zerodrift enabled auto-merge November 18, 2026 21:22
@zerodrift
zerodrift merged commit 6fbda87 into master Nov 18, 2026
24 checks passed
@zerodrift
zerodrift deleted the fix/json-read-transport-performance-20261118 branch November 18, 2026 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant