How's Linear so fast? A technical breakdown

TL;DR

Linear updates issues in a few milliseconds by using a local database in the browser and an optimized sync engine. This approach eliminates network latency for most interactions, making the app feel instant. Details about their exact implementation are based on observed techniques and public information, not direct access to their code.

Linear can update issues in just a few milliseconds, a speed that surpasses traditional web apps by over 300 milliseconds, thanks to its innovative architecture built from the ground up for speed. This approach involves storing the database in the browser and optimizing the sync process, making the app feel instant to users.

Linear’s performance advantage primarily stems from its use of IndexedDB as the local database, which allows most data reads and mutations to occur entirely within the browser without waiting for server responses. When a user updates an issue, the change is applied immediately to in-memory state and persisted locally, with the sync engine batching and asynchronously sending updates to the server. This process avoids the typical network latency associated with server round-trips.

Unlike conventional web apps that rely on HTTP requests for each data change, Linear’s approach minimizes network interactions during user operations. Their sync engine, designed from the start, queues and batches updates, broadcasting only deltas to other clients via WebSocket. This design enables near-instantaneous UI updates, with no loading spinners required for local changes.

Linear’s stack is notably simple, built with React, TypeScript, MobX, and PostgreSQL, with a focus on client-side rendering. The app’s architecture emphasizes optimistic updates, where the UI reflects changes immediately, and background validation occurs asynchronously, further enhancing responsiveness.

Why It Matters

This architecture demonstrates a shift towards local-first web applications, where reducing reliance on network latency dramatically improves user experience. It provides a blueprint for building highly responsive apps, especially in collaborative environments where real-time updates are critical. For developers, understanding Linear’s approach offers insights into how to optimize performance by rethinking traditional server-dependent workflows.

Building Progressive Web Apps: Bringing the Power of Native to the Browser

Building Progressive Web Apps: Bringing the Power of Native to the Browser

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Background

Prior to this, most web apps relied heavily on server requests for data updates, resulting in noticeable delays. Linear’s approach, first discussed publicly in 2024, involves storing a local copy of the database in the browser, a method that is uncommon in typical SaaS applications. Their focus on a custom sync engine and local-first design aligns with trends toward faster, more responsive interfaces, especially in productivity tools.

“‘Literally the first lines of code that I wrote was the sync engine, which is very uncommon to what you usually do when you’re a startup.'”

— Tuomas, Linear co-founder

What Remains Unclear

Details of Linear’s exact implementation, such as the internal workings of their sync engine and how they handle conflict resolution or offline scenarios, remain unconfirmed. The analysis is based on public statements, observed behaviors, and best guesses from available information.

What’s Next

Further technical disclosures or developer talks from Linear may clarify their architecture. Monitoring their updates, conferences, or blog posts will reveal whether they expand on their sync engine and local database strategies. Additionally, other developers may attempt to replicate or adapt similar techniques in their applications.

Key Questions

How does Linear ensure data consistency across clients?

Linear uses a custom sync engine that batches and broadcasts deltas via WebSocket, but specific conflict resolution strategies are not publicly detailed. It is likely based on operational transformation or CRDTs, common in real-time collaborative apps.

Can this approach be applied to other web apps?

Yes, especially for apps where real-time responsiveness is critical. However, implementing a local database and custom sync engine requires significant development effort and may not suit all use cases.

What are the limitations of Linear’s architecture?

Potential challenges include handling offline scenarios, data conflicts, and ensuring security. The architecture also depends heavily on the local database’s reliability and consistency.

Does this architecture impact initial load times?

While initial load times may be slightly longer due to setting up the local database, the overall user experience benefits from instant responsiveness during interactions.

Source: Hacker News

You May Also Like

One upload in. A whole channel’s worth of content out.

ChannelHelm’s v1.5 release enables creators to turn one upload into a full content suite, improving performance-based learning and reducing manual work.

The Largest Available Minecraft World, Totalling 15 TB

A new Minecraft world has been created, reaching 15 terabytes, making it the largest available in the game. Details on its development and significance.

David Beazley – Programming Courses

Renowned programmer David Beazley announces new online courses focused on advanced Python programming, aimed at developers seeking to deepen their skills.

Undervolting Your GPU for Local Inference: Lower Heat, Same Tokens/sec

Undervolting your GPU via power limiting can reduce heat and noise during AI inference without sacrificing tokens/sec, according to recent tests.