How Linear Achieves Ultra-Fast Performance Through Browser-Based Database Architecture
Original: How's Linear so fast? A technical breakdown
Why This Matters
Demonstrates how local-first architecture can eliminate network bottlenecks in web applications
Linear achieves millisecond response times by storing data locally in IndexedDB and applying mutations locally first before syncing to servers. Traditional apps take 300ms for updates, while Linear eliminates network wait times through optimistic updates and background synchronization.
Linear's speed comes from inverting traditional web app architecture. Instead of making HTTP requests for each action, Linear stores the actual database in the browser using IndexedDB. Mutations apply locally first, then asynchronously sync to servers via WebSocket. Co-founder Tuomas revealed they built the sync engine as their first code lines in 2024, prioritizing performance from day one. A simple issue update like 'issue.title = "Faster app launch"; issue.save();' triggers immediate UI re-rendering from local MobX observables while background sync handles server updates. This eliminates spinners and loading states that plague traditional CRUD applications. The article notes that libraries like Tanstack Query and SWR can achieve similar results through optimistic updates for most use cases.