conductor-rewrite-performance
When to use this skill
- You're building a local-first desktop application with React and experiencing performance bottlenecks
- Navigation or route changes trigger cascading re-renders across multiple mounted components
- You have a chat interface or long list that streams content and re-renders become sluggish
- You're using Tauri and need to profile React performance but can't access Chrome DevTools
- Multiple heavy views are mounted simultaneously (sidebar, nav, chat, terminal, editor) and all re-render on state changes
- You need to manage multiple heavyweight child processes without exhausting system memory
Core principles
-
Local-first eliminates an entire category of performance problems. When SQLite is your source of truth and the UI never waits on the network, the bottleneck moves up into the rendering layer—every unnecessary re-render becomes the slowest thing users feel.
-
Unstable references cascade re-renders through the entire component tree. When router hooks return fresh objects on every render, every component reading them re-renders even when values haven't changed, and those re-renders propagate to all children.
-
Virtualization plus memoization is the only way to make streaming lists fast. Render only what's on screen (15 messages instead of 500), and ensure only the actively changing item re-renders while the rest stay memoized.
-
The fastest operation is the one the user never waits on. Move expensive synchronous work (like git checkpoints) off the critical path so the first token arrives immediately.