You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf(web): cut RAF handler from 62ms to single-frame budget
"[Violation] requestAnimationFrame handler took 62ms" was Timeline's
paintPlayhead reading clientWidth + scrollLeft on every frame —
forced-layout reads inside the RAF body — plus an unnecessary
textContent write to the elapsed-time counter at 60fps.
Timeline:
- Cache clientWidth + scrollLeft in scrollMetricsRef. The view-emit
effect already reads them once per scroll/resize inside its own RAF;
paintPlayhead now uses the cached values and only writes scrollLeft
when the playhead crosses the auto-follow trigger. No layout
thrashing per frame.
ComposePage:
- Throttle the elapsed-counter to ~10 fps. Sub-100ms changes aren't
readable by a human, but every textContent assignment forces a string
allocation and a DOM mutation; doing it 60× a second was a
measurable slice of the per-frame budget. Playheads still paint at
full 60fps for smoothness.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
> `seslen` is under active development. The API may break between 0.x releases.
18
+
<palign="center">
19
+
<strong>🎧 Live playground:</strong> <ahref="https://seslen.productdevbook.com">seslen.productdevbook.com</a> — preview every preset, build patterns in the composer, and copy the exact code.
20
+
</p>
21
+
22
+
> [!IMPORTANT]
23
+
> **Got a sound in your head? Send it our way.**`seslen` is community-built — every preset starts as a one-file PR. The biggest contribution you can make right now is a new preset: open [`src/presets/`](./src/presets/), copy [`_template.ts`](./src/presets/_template.ts), and ship it. We'll help land it.
19
24
20
25
## Why seslen?
21
26
@@ -37,7 +42,7 @@ handle?.stop()
37
42
## Features
38
43
39
44
- 🪶 **Zero dependencies**, pure ESM, tree-shakeable
40
-
- 🎹 **36 synthesised presets** — every play generated fresh on `AudioContext`
45
+
- 🎹 **Synthesised UI presets** — every play generated fresh on `AudioContext`
41
46
- ⚡ **Lazy AudioContext** — created only on the first `play()`
42
47
- 🔓 **Auto-unlock** — resumes the context on the first user gesture
43
48
- ♿️ **Respects `prefers-reduced-motion`** — auto-mutes by default
0 commit comments