Hasty Briefsbeta

Bilingual

The Conductor Rewrite: What They Changed to Make It Fast

2 days ago
  • #Performance Optimization
  • #React
  • #Local-First Architecture
  • Conductor rebuilt its app from scratch to improve performance significantly.
  • The team built the product for themselves, using it daily (dogfooding) to prioritize fixing pain points quickly.
  • Performance bottlenecks were identified by shimming Tauri's invoke() bridge to run the React app in Chrome, enabling use of Chrome profiler and React DevTools.
  • Migration from react-router to @tanstack/react-router provided stable references, reducing unnecessary re-renders across components.
  • Chat performance was enhanced using react-virtuoso for virtualization and React.memo to re-render only streaming messages.
  • Agent processes run on Bun instead of Node, reducing bundle size and improving runtime efficiency.
  • Idle agent processes are shut down to reclaim memory and resumed on demand with session persistence.
  • Checkpointing for agent runs was moved off the critical path to reduce latency before the first token response.
  • The app is local-first with SQLite as the source of truth, eliminating network waits.
  • Tauri was chosen over Electron for a smaller bundle, faster cold start, and native WebKit webview rendering.
  • Key tech stack includes React 19, TypeScript, Vite, TanStack libraries, Zustand, and other modern tools.