Skip to content

Remove fixed delay from remote filesystem provider responses #280

Description

@wieslawsoltes

Parent/product acceptance: #252
Release coordination: #227

Problem

An unchanged Code OSS vscode-remote workspace reaches the correct new-document root and registers the stock RemoteFileSystemProviderClient, but WebScene takes about eight seconds to complete the first direct IFileService.resolve for a five-entry local fixture. Chromium against the same Code OSS server/provider/root completes the resolve in 328 ms and paints the five Explorer rows in 715 ms.

This is below the picker/navigation/workspace-context layers already qualified by #247 and AppScene#124. It is a generic native WebScene request/response latency boundary in the remote filesystem path and blocks #252's provider/Explorer performance gate.

Retained evidence

Exact source inputs:

  • VS Code OSS 645f29cc3176500b4b5762ba887cf2a7f0ffdf2c
  • WebScene 28d1d649e927c665ff05844197af44f223edf952
  • AppScene 1420e227e52579a097e7ae52a2cadb41cf073e4d
  • Node 24.18.1
  • fixture root /private/tmp/webscene-247-fixture/beta

Clean native trace after await fileService.activateProvider('vscode-remote'):

  • selected URI equals the only IWorkspaceContextService root
  • provider registered before resolve
  • resolve: 8,139.3 ms
  • first five Explorer rows: 12,324.0 ms from observer start
  • resolved child set is exact: .hidden.txt, readme-link, README.md, subdir/, unicodé.txt
  • rendered rows: 5; Explorer DOM nodes: 64

A separate overlapping run is retained as contaminated timing and excluded from the performance conclusion; it independently measured an almost identical 8,132.1 ms resolve.

Headless Chrome 153 against the same server build, stock provider, and exact root:

  • resolve: 328.2 ms
  • first five Explorer rows: 714.9 ms
  • provider/root/resolved/model/rendered sets all exact
  • observer sampling maximum: 0.5 ms
  • 2 s resolve/paint gate passed

The browser observer revision only adds post-resolve Explorer-model polling. The activation and direct resolve path is byte-equivalent to the native trace. Earlier providerRegistered=false and empty model findings were observer-ordering false positives and are excluded.

Investigation

  1. Reduce the remote filesystem request/response path to the smallest same-origin WebSocket/channel fixture that reproduces native latency with a fast Chromium oracle.
  2. Attribute time across renderer enqueue, socket write/read, server channel handling, native event-loop wakeup, interop dispatch, and promise/microtask continuation.
  3. Check whether the fixed delay applies to the first request only, every request, reconnects, cancellation, errors, and concurrent requests.
  4. Fix the smallest generic WebScene owner contract. Keep Code OSS and its remote provider unchanged.

Acceptance

  • A product-neutral browser/native oracle returns identical stat/read-directory results and error classes through the same request/response protocol.
  • Cold and warm native p50/p95 are recorded against Chromium; the five-entry fixture completes resolve and first-child paint within 2 s.
  • One logical provider request produces one bounded socket write and response; queue depth, queued bytes, tasks, DOM mutations, scene publications, and wakeups have explicit ceilings.
  • Cancellation, disconnect/reconnect, denied/missing paths, malformed responses, and out-of-order concurrent responses settle once without stale delivery.
  • A repeated lifecycle gate releases sockets, callbacks, promises, tasks, provider listeners, documents, and watcher handles; RSS/V8 heap growth is bounded.
  • The unchanged Code OSS product trace preserves the exact selected URI, provider registration, five resolved/model/rendered children, and watcher readiness under the latency bounds.
  • Directly related macOS/Linux native checks and the Chromium oracle pass before Qualify remote workspace bootstrap, Explorer contents, and watcher refresh #252 is requalified.

Current disposition — 18 September 2026

The implementation chain is complete: #297 closed its theme-continuation slice and the scheduler work from #287/#293/#289 landed through PR #347 as dbd7351a. Product-shaped direct evidence now keeps the 1.07 MiB protocol flush at 0.157 ms p95 / 0.274 ms max with bounded queues and flat V8 heap.

This issue requires no separate implementation. It remains open only for the same current-package #252 exact provider/root/first-child proof used to close #287, #293, and #289. If that run passes, close all four from the shared evidence; if it fails, attribute the new earliest boundary before opening another child.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingvscode-oss/plannedPlanned for the AppScene/WebScene VS Code OSS integration

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions