Repository navigation
Measure the data browser and plan its redesign - #333
Conversation
Add the redesign plan (specs/2026-10-30-data-browser-redesign.md, agreed by two reviewers) and its prior-art survey, and the measurement the plan's later phases are judged by: - scripts/bench-data-browser: streams Stata-shaped 10M x 10 and 1M x 500 (strL) fixtures, drives the real DataBrowserPanel under Node through a fake webview, and reports time, the extension host's longest event-loop stall, payload size and peak RSS per operation (bun run bench:data-browser; --scale, --cold). - A VS Code-hosted suite that times each open to the first rows painted (client: bun run test:perf), fed by webview timing marks behind the new sight.dataBrowser.debugTiming setting. - Display-truth and missing-identity batteries; today's gaps are pinned to today's output so a fix fails them on purpose. - A report-only CI job at 10% scale with cold reads. client/test/package.json scopes the CommonJS test runners, which have not loaded under client's "type": "module" since the ESM migration.
430b061 to
219d311
Compare
|
Caution Review failedThe pull request is closed. Walkthrough
Merge Risk:
|
Sight's data browser freezes the editor on big datasets: every sort, filter, histogram and copy runs on the extension host's event loop for its whole duration. On a 10M-row file a string sort blocks VS Code for 14.8 s; a slow regex filter, 29 s; a catastrophic one, until you kill the window. Opening a 1M × 500 survey file with strLs blocks for 0.66 s and ships a 5 MB first page. This PR is Phase 0 of a redesign: the plan, and the measurement every later phase is judged by. It changes no browser behavior.
The plan is
specs/2026-10-30-data-browser-redesign.md, with a prior-art survey beside it. It ports selected pieces of Raven's viewer (radix and rank sort, scan worker, profiles, summary band, columns sidebar), keeps reading.dtadirectly, and keeps Stata semantics first-class. Claude Sonnet and GPT-6.1 Terra both agreed to it after six review rounds. Their objections, and the edits that answered them, are recorded in the spec. Phases after this one: 1a moves full-column work off the host (no dependency change), 1b moves to dta-parser 1.x with reader threads and a compact wire format, then truthful display, speed, column understanding, and navigation.What this PR adds
bun run bench:data-browser(scripts/bench-data-browser/) generates Stata-shaped fixtures (10M × 10; 1M × 500 with labelled extended missings and strLs). It drives the realDataBrowserPanelunder Node through a fake webview that serializes every message, as VS Code does. For each operation it reports time, the extension host's longest event-loop stall, reply size and peak RSS.--scaleand Linux--coldare available.bun run test:perf(inclient) opens fixtures in a real VS Code and times each one to the first rows painted. It reads webview timing marks behind a newsight.dataBrowser.debugTimingsetting (off by default), which also logs the marks for everyday diagnosis.%tdDD/NN/CCYYshows21521,%th,%gwidth, missing codes not ordered. < .a < … < .zin a sort) are pinned to today's output, so the phase that fixes one fails its test on purpose.client/test/package.json("type": "commonjs").node client/test/runTest.jshad not loaded since the ESM migration madeclienta module package; this restores the smoke and layout suites and hosts the new one.Baseline (M4 Max, Node 26, warm cache; host blocked = longest event-loop stall)
A page request in flight when a sort starts is dropped without a reply. The webview recovers only by re-requesting after the sort lands.
Checks.
bun run check:line-endings,bun run typecheckandbun run lintpass.bun test ./testspasses except 2 tests intests/integration/help-topic-coverage.test.ts, which need a local Stata install and fail the same way onmain.bun run test:perfpassed against an installed VS Code at 10% and full scale.Reply sizes in the table were measured as UTF-16 code units; the harness now counts UTF-8 bytes, which is a little larger for the wide fixture's non-ASCII text.
Proof: all four repo gates were rerun after rebasing onto main (the only failures are the 2 tests that need Stata), and
test:perfwas run in a real VS Code.Reviewed with sol-loop: 2 rounds with gpt-6.1-sol. Sol verdict: approved
Created with Claude Opus 5.5 in Claude Code; the plan was reviewed by Claude Sonnet 5.5 and GPT-6.1 Terra (Codex).
Summary by CodeRabbit