Skip to content

Dispatch WebSocket events fairly across sockets - #888

Merged
wieslawsoltes merged 1 commit into
mainfrom
fix/websocket-per-socket-fairness-289
Sep 21, 2026
Merged

wieslawsoltes merged 1 commit into
mainfrom
fix/websocket-per-socket-fairness-289

Conversation

@wieslawsoltes

Copy link
Copy Markdown
Collaborator

Independent WebSocket connections shared one global receive FIFO, allowing a bulk connection to delay a latency-sensitive protocol byte on another connection. Keep FIFO ordering within each socket and round-robin sockets with pending events while preserving the existing global count/byte limits and empty-to-ready wake behavior.

This advances #289 and #280. It closes the cross-socket starvation mode; #289 remains open for the separately measured cold extension-host process launch.

Validation:

  • native two-socket gate: a one-byte marker is event 2 while a peer queues 128 × 4 KiB frames
  • browser WebSocket lifecycle: 100/100 cycles, p95 0.192 ms
  • product-shaped protocol lifecycle: 20/20 cycles, Ready p95 2.65 ms, Initialized p95 11.91 ms
  • FileReader/timer regression: pass, 64-timer backlog in 0.324 ms
  • exact clean SDK: 2,906 files, manifest verified, compiler/runtime profile verified
  • AppScene host suite: 31/31 pass
  • unchanged Code OSS exact workspace function: selected root/provider/5 resolved/5 model/5 visible/64 DOM nodes pass; resolve 1,300 ms
  • product first paint remains red at 2,375 ms; retained server evidence attributes the remaining 908 ms transport→Ready interval to cold Node extension-host process launch, while Node Ready→WebScene dispatch is 44 ms

Evidence: docs/validation/websocket-per-socket-fairness-20260921.md; local product log /private/tmp/vscode-demo-workspace-ae37b204-run2.log.

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