试试这个
- 连续滚动几屏,网格仍应保持可交互。
- 在名称框输入 F45000,直接跳到深处。
- 编辑一个值,工作簿仍留在 worker 中。
它是怎么做到的
UI 把视口指标发送给 backend port。Rust/WASM 工作簿和公式留在 Web Worker,浏览器只接收可见行和少量预取行。
WORKER / WASM DEMO
在 100,000 行订单表里滚动时,浏览器只向 worker 请求一个很小的可见投影窗口。
UI 把视口指标发送给 backend port。Rust/WASM 工作簿和公式留在 Web Worker,浏览器只接收可见行和少量预取行。
/**
* Seed for the "performance" demo — a 100,000-row × 8-column generated
* dataset (800,000 data cells) loaded through the worker's chunked
* import-session API (`beginImport` / `importChunk` / `commitImport`),
* never through per-cell `setCell` calls (see `seed-formulas.ts` for that
* pattern, which is fine at ~20 cells but would be ~400,016 RPC round
* trips here).
*
* Mode choice — `direct`, not `atomic`: the WASM worker runtime caps
* `atomic` import sessions at `MAX_IMPORT_SESSION_NORMALIZED_CELLS`
* (200,000 cells; see `worker-runtime.ts`) because an atomic commit
* installs the whole staged batch as one full-sheet replace. `direct`
* mode has no such session-wide cap — each chunk lands additively in the
* live workbook via the engine's native `bulk_import_cells` batch call —
* so it is the only session mode that can reach the ~400k-cell target.
* The WASM/TS perf bench (`excel/solid-excel/test/perf-ts-vs-wasm-
* report.md`) measured `bulk_import_cells` on pure-literal batches at
* 887ms for 500,000 cells in one call; chunked at ~8,000 cells/call the
* total native cost for this seed's ~400k literal cells should land
* comfortably under a couple of seconds.
*
* Per-row formulas were deliberately NOT used for `revenue`: `direct`
* mode parses formula text eagerly per chunk (unlike `atomic`, which
* parks formula text unparsed until commit), and the same perf report