Performance: large-file hydrate streaming and progressive delivery #32

Open
opened 2026-04-16 22:24:37 +09:00 by mschoi · 0 comments
Owner

Goal

Eliminate sidebar hydrate stalls for large/high-latency files by introducing streaming/chunked delivery design while preserving the small-file fast path.

Problem

Current hydrate flow is still fundamentally file-level full read. Under high latency or large file access this can repeatedly hit timeout budgets and block perceived responsiveness. Recent precheck and timeout reductions help but do not remove the architectural limit.

Scope

  • Define chunked/streamed file/read extension over channel envelope.
  • Keep existing one-shot file/read fast path for small files.
  • Add cancellation semantics so stale in-flight chunks stop when active tab changes.
  • Define progressive editor/cache update safety rules (partial content visibility + finalization).

Acceptance Criteria

  • Active-tab file open remains responsive under high latency where one-shot read previously stalled.
  • Stale chunk streams are canceled when user changes target file/tab.
  • Regression tests cover stream ordering, cancellation, and finalization correctness.
  • Fallback path preserves current behavior for environments without stream support.
  • #31 (channel multiplex)
  • #25 (timeout/kill policy)
## Goal Eliminate sidebar hydrate stalls for large/high-latency files by introducing streaming/chunked delivery design while preserving the small-file fast path. ## Problem Current hydrate flow is still fundamentally file-level full read. Under high latency or large file access this can repeatedly hit timeout budgets and block perceived responsiveness. Recent precheck and timeout reductions help but do not remove the architectural limit. ## Scope - Define chunked/streamed `file/read` extension over channel envelope. - Keep existing one-shot `file/read` fast path for small files. - Add cancellation semantics so stale in-flight chunks stop when active tab changes. - Define progressive editor/cache update safety rules (partial content visibility + finalization). ## Acceptance Criteria - Active-tab file open remains responsive under high latency where one-shot read previously stalled. - Stale chunk streams are canceled when user changes target file/tab. - Regression tests cover stream ordering, cancellation, and finalization correctness. - Fallback path preserves current behavior for environments without stream support. ## Related - #31 (channel multiplex) - #25 (timeout/kill policy)
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sublime-rs/sessions#32