Skip to main content

The half of Velocity the user feels. None of it makes the server any faster.

Optimistic mutation

Both columns talk to the same simulated server. One waits for it; the other applies the intent immediately and reconciles afterwards.

Naive

Blocks for 500ms per click.

Velocity

Applies now; the same 500ms confirmation follows.

Only for reversible, predictable actions. Payments, deletions and permission changes are never optimistic — a rollback that restores a privilege the user never had is worse than a wait.

Intent preloading

Six levels of speculation over SvelteKit's own triggers. The attributes below are read from the module, not retyped.

IntentCodeDataUse for
noneoffoffExpensive, rarely followed, or mutating links.
codeviewportoffAn expensive route: warm the chunk, spend nothing on the server.
datahoverhoverThe ordinary case, matching the app-wide hover default.
code-dataviewporttapHigh-probability links: chunk early, data on pointer-down.
idleoffoffDriven by preloadOnIdle after the page is interactive, not by an attribute.

Data never fires from mere visibility. On a page of forty links, viewport-triggered data would run forty route loads for someone who scrolled past.

Virtualized rendering

A long list should cost the size of the viewport, not the size of the data. Switch the row count and watch what stays in the DOM.

10000 rows in the data, about 19 in the DOM.

Uniform row height only, on purpose: variable heights need measurement and a running offset table, and every one of those is a source of scroll jump. Arrow keys, Page Up/Down, Home and End move a roving selection — the rows a user would tab through mostly do not exist.

Think this pattern could be better? Tell us how.

Leave feedback