FE-1552: Reuse sweep compute, stream the selection first, and pipeline the ladder - #9474
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
d1a91f3 to
28a8834
Compare
28a8834 to
efbf71f
Compare
PR SummaryMedium Risk Overview Scheduling changes how work is ordered: the navigator’s selection must stream before surface sampling ( UI correctness/perf: surface cells read metrics from the last frame with samples (fixing terminating nets), metric charts apply plot data once per animation frame, and axes can mount before data arrives; switching surface metrics repaints from cached per-cell values. Reviewed by Cursor Bugbot for commit 777f383. Bugbot is set up for automated code reviews on this repo. Configure here. |
19c6a52 to
41d18ae
Compare
The merge-base changed after approval.
Important
Experimental
Behind the Parameter sweeps and WebGPU feature flags.
Summary
Before this PR, opening the sweep drawer and moving its sliders was slow because compute was spawned, serialised and thrown away. 166 web workers filled one view, one experiment ran per surface cell, ladder rungs ran one at a time, and every batch created a fresh GPU device, shader and calibration. Terminating nets plotted an empty surface.
This PR reuses that compute with pooled workers, batched surface cells and one GPU backend per session. It streams the selected point before anything else, fills the surface in quad-tree levels and pipelines the ladder. Results are unchanged: same seeds, same trajectories.
Measured on the
Bench / SweepDrawerstory, base against this PR:Links
Changes
Sweep view
Bench / SweepDrawerStorybook fixtureCompute reuse
createReusableWorkerFactoryin core hands out leases over an idle poolsampleCellsBatchturns many surface cells into one experimentScheduling
whenSelectionStreamed()gates surface work behind the selection's first framesquadTreeLevelsfills the surface corners firstKnown issues
Test coverage
reusable-worker-factory.test.ts:gpu-backend-cache.test.ts:runner.test.ts,metric-windows.test.ts:sweep-session.test.ts:contour-grid.test.ts:provider.test.tsx:How to test
Demo
Screenshots pending (will be handed over for drag-drop).