perf(tooling): add an animation cost profiler and document the harness
Adds `bun run profile:animation`: it serves an isolated fixture and measures each animation variant directly, so comparing techniques takes seconds instead of an application rebuild plus a streamed response. The result is unambiguous and does not vary with element count, measured from 1 to 32: transform, opacity and filter cost zero extra style recalculations, while the individual rotate property, background-position, border-color and box-shadow each recalculate style 60 times a second, and geometry properties add layout on top. Notably `rotate: 360deg` is not a cheap synonym for `transform: rotate(360deg)`, and will-change, wrapper elements, containment and stepped timing do not make a non-composited property cheap. `scripts/perf/DOCUMENTATION.md` documents all four capture commands, how to stand up a production build to measure against, how to read the artifacts, the validity guarantees the scripts enforce, and the methodology rules, so this can be handed to an agent as the entry point for measuring performance. It is linked from the root guide's documentation anchors. The theme skill gains an animation contract carrying the measured table, and the performance skill points at the tooling documentation.
This commit is contained in:
@@ -65,6 +65,7 @@ High-value anchors:
|
||||
- Sync: `packages/ui/src/sync/DOCUMENTATION.md`
|
||||
- Stores: `packages/ui/src/stores/DOCUMENTATION.md`
|
||||
- CLI: `packages/web/bin/lib/DOCUMENTATION.md`
|
||||
- Performance measurement tooling: `scripts/perf/DOCUMENTATION.md`
|
||||
- VS Code runtime: `packages/vscode/src/DOCUMENTATION.md`
|
||||
- Electron: `packages/electron/README.md`
|
||||
- Mobile: `packages/mobile/README.md`
|
||||
|
||||
Reference in New Issue
Block a user