Skip to content

Complete FileReader reads within one browser task - #887

Merged
wieslawsoltes merged 1 commit into
mainfrom
fix/filereader-single-task-280
Sep 21, 2026
Merged

wieslawsoltes merged 1 commit into
mainfrom
fix/filereader-single-task-280

Conversation

@wieslawsoltes

Copy link
Copy Markdown
Collaborator

FileReader split every Blob read across two native tasks, so protocol consumers paid two scheduler and microtask/style checkpoints per message. Complete the asynchronous FileReader lifecycle in one browser task while preserving the required loadstart → Promise continuation → progress → load/error → loadend ordering.

This advances #280 and #252. It removes the measured FileReader bottleneck; the remaining product bound is independently tracked by #289.

Validation:

  • pinned Node 24.18.1 compatibility tests: 8/8 pass
  • focused native websocket-file-reader gate: pass, including 100 socket cycles and 20 protocol cycles
  • FileReader p95: 0.02525 ms; 64-timer backlog: 0.314 ms; queue high-water: 1
  • exact unchanged Code OSS package: five provider children, five Explorer model children, five visible rows, and 64 native nodes pass
  • product FileReader maximum improved from 1,114 ms to 31–45 ms across candidate runs
  • best exact first-child paint improved from 2,530 ms to 2,043 ms; Bound the packaged remote extension-host Ready-to-Initialized handshake #289 owns the remaining remote WebSocket Ready delay

Detailed evidence: docs/validation/file-reader-single-task-20260921.md.

@wieslawsoltes
wieslawsoltes merged commit ff58543 into main Sep 21, 2026
6 of 7 checks passed
@wieslawsoltes
wieslawsoltes deleted the fix/filereader-single-task-280 branch September 21, 2026 01:00
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