frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

How's Linear so fast? A technical breakdown

https://performance.dev/how-is-linear-so-fast-a-technical-breakdown
86•howToTestFE•1h ago

Comments

xiaoyu2006•39m ago
I was expecting a post on how hardware accelerate linear algebra lol
lampe3•38m ago
funny how things come back.

I loved meteorjs and its still my fav framework to this day.

Seeing optimistic ui and browser based databases being used this way makes me happy.

I would like to understand how they do the chunking and only updating part of the graph instead all of it.

ArtRichards•36m ago
They're doing some really cool stuff with Agents too.. automating software pm. it's a huge difference between this and their (unnamed) larger competitors.
AG342•36m ago
I've always wondered how they made the UX so slick - thanks for sharing.
ianberdin•34m ago
Thanks for the read. It is a bit more complicated than you think. I completely rebuilt this sync engine + orm with relations, lazy loading etc, using Vue + Pinia in https://playcode.io. Google Linear’s videos, they explained in detail their architecture.

Yes, I spent a few months. But it worth it. Every new field, model I need to add, it is so straightforward. I do love frameworks and foundations. They make live easier later by a lot.

ianberdin•33m ago
Feel free to ask questions.
lampe3•32m ago
what google linear video?
echoangle•29m ago
I think google is an imperative verb here. You're supposed to google (as in search for) Linears Videos.
ianberdin•6m ago
https://m.youtube.com/watch?v=Wo2m3jaJixU&ra=m

https://m.youtube.com/watch?v=WxK11RsLqp4&t=2175s&pp=2AH_EJA...

These are original video. Very clear and a way better than the blog post.

cuechan•33m ago
> A traditional CRUD app doing the same thing takes about 300ms.

300ms seems like a lot. Even if this includes the whole http request+response it still seems unbelievably long.

jpollock•25m ago
It depends on where your clients are, and where your servers are. You may have a lot of customers in a country and not want to host servers in that country (tax, regulatory, maintenance cost, etc.)

RTT from Hyderabad to the East Coast USA is ~300ms.

Then you have execution and database retrieval.

https://wondernetwork.com/pings

IshKebab•4m ago
Yeah you can easily get this speed down to like 100ms which is near enough to instant to not matter. You definitely don't need to go to client side rendering for most things to feel fast.

Also I couldn't see any explanation of what happens when a network request fails. That's a huge downside of local rendering.

I think for most sites the best option is still server-side rendering but use a fast backend (e.g. not Python) and lightweight frontend.

syspec•33m ago
Whole blog post is basically: Make a mutation in the clientside, assume it worked, and save in the background.
NewsaHackO•24m ago
I agree. To each their own, but the UI updating automatically doesn't really add much value to me. I would prefer that the view I am seeing is a snapshot in time of what the ground truth server was, not some mixed state that forces me to consider the possibility that seeing my request go through on the screen doesn't actually mean it went through and has been sent to the server.
prerok•23m ago
Indeed. I have to say, I hate this. Suppose you are in a meeting, you update something and you see the result, but the rest of the team does not. Ok, a couple of hundred ms does not play into this but if the update does not make it through? And yes, it happens.
pier25•22m ago
For native apps this is less of an issue since they have access to persistent storage but with browsers there's no guaranteed persistence.
jacobgold•32m ago
These kinds of local-first syncing web apps are really interesting and can be really useful, but I think the premise is somewhat wrong.

"A few milliseconds is all it takes to update an issue in Linear. A traditional CRUD app doing the same thing takes about 300ms."

"Any data sent between the client and server costs hundreds of milliseconds."

There’s no solving the problem of a large RTT between an HTTP client and server when it’s due to the speed of light.

But what you can do is locate the backend near users and make sure it’s fast.

For example, it’s very possible to run a web app backend within ~10ms RTT of most users and have the backend render responses within ~10ms too.

In other words, you can absolutely create a traditional CRUD app where doing the same thing takes more like 30ms, not 300ms.

adverbly•32m ago
Any good resources or wrappers for indexedDB people would recommend? The API seems kinda unapproachable compared to other data stores.

https://github.com/tinyplex/tinybase seems kinda good maybe?

saagarjha•25m ago
I’ve actually found Linear to be quite slow? There was a week where it would also spin at 100% CPU if I left a tab with it open for a while :(
seabombs•19m ago
It appears to use a lot of memory too, at least in Firefox. I can't have more than a few Linear tabs open at a time.
hamandcheese•25m ago
I worry that optimistic updates is going to become trendy and applied to more software, but without any plan for the "sad path" - failed to sync, sync conflict, etc. Get ready for a whole new era of race conditions and frustration!
jack_pp•20m ago
Don't you have the same problems with basic CRUD apps? Also you need to handle the sad path for every single request instead of having the sync engine do it all in one place.
Escapado•15m ago
Correct but the feedback is usually more immediate. Save a change to your issue and it fails - You will get an error toast and probably stay on the form.

In the local first world you might have navigated away already and created 3 more issues of which 2 more failed because of schema drift or other conflicts. And you might have edited one that was deleted. And now you need to figure out what exactly to tell the user - or what not to tell them.

jack_pp•7m ago
Well the sync engine can figure out if there's an issue fast, say <500ms, if you build it that way. Then you can just make a toast telling the user there are issues and anything they do will be saved locally only for the time being.

Warn the user that if they leave the website their changes won't be saved remotely.

hamandcheese•3m ago
The issue that I foresee is that the point of error becomes decoupled from the UI and the UI doesn't handle a delayed error. Especially if retrofit into existing products.
wbobeirne•24m ago
I'm glad to see more positive takes on client-side rendering. Unless SEO and crawlability are important for your site, server side rendering is such an overprescribed solution. If I put my tin-foil hat on, I'd say it gets a lot of attention because it's a lot easier to charge people for server time spent in SSR that you just don't have in CSR.

Bottom line is, if your app's content is behind a login screen, just use client side rendering. It is way lower complexity and a way better user experience.

simjnd•23m ago
Last year a guy reverse engineered Linear's sync engine and published it on GitHub with a cool explainer.

https://github.com/wzhudev/reverse-linear-sync-engine/blob/m...

pier25•19m ago
Honestly you can POST to an API to the other side of the world and receive a response in less than 300ms. That's literally the blink of an eye. There are very few use cases where such you need even lower latency than that while at the same time sacrificing reliability (there's no guaranteed persistent storage in a browser).
Escapado•18m ago
I love using linear and where applicable I try to use optimistic updates in the applications I build too and I think it's a good article that touches on the most important aspects of a performant web app of that caliber.

One thing I would like to point out though is that building a performant sync engine that behaves the way you would like in most cases is a non-trivial thing.

If two users are offline and add, edit, remove issues and come online again, you need to reason about what happens. Sometimes you can get away with Last Writer Wins but what happens if an issue is deleted and then edited. What happens if an item in a list gets re-ordered differently on different clients, what's the final ordering? In which cases can you merge what state and in which do you need to discard something. Do you show a conflict resolution UI? How do you deal with rollbacks. How do you deal with schema drift and updates on items that would be affected by schema drift? Business logic might change between being reconnects. FK constraints can shift. Can you set up your data and the sync engine so that it only syncs the minimum amount of changes and batches them correctly during longer offline sessions so you don't fire 5000 change requests after reconnecting?

I recently had to implement local first + remote sync on some fairly complex dynamic forms and where luckily there is usually only one writer and I can get away with last writer wins and reject if things are too old or if there is schema drift and can just display an error message and roll back. But what I am trying to say is: Whatever can go wrong in an online-first world, can also go wrong in an offline first world but you might get informed of that all at once at a later time - or not at all and your data is not what you think it should be. Some sync engines like zero from rocicorp has opted out of supporting offline writes entirely because of all these problems.

And just to be clear: I love offline first approaches. I yearn for fast performance. And in a lot of cases slapping a sync engine on your app can really be helpful for that if your use case allows it. But it's absolutely crucial to be aware of the pitfalls that come with it.

blauditore•18m ago
TL;DR: Background syncing instead of synchronous updates to the cloud.

This is basically a thick client, and comes with according trade-offs. It's interesting and there are some best practices, but I can't help but feeling that either the author is a huge fan or the post is an ad (or "sponsored").

0xbadcafebee•16m ago
> 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

He chose the path to a better product rather than the path to a quick buck. That is definitely odd for a silicon valley startup

jwr•8m ago
Linear is the best web app I have ever seen, period. It is also the best bug-tracker I've ever used. I use it, and pay for it (gladly). It's worth it.

I am genuinely impressed with their engineering and design — I aspire to attain these levels, though I lack not only the skills, but also several zeroes in my bank account, I think. Still, it's worth looking at what they do and try to get there!

Big props and kudos to the Linear team. It's an impressive app.

wasmperson•5m ago
In gamedev, "optimistic updates" are called "client-side prediction," and are a standard part of multiplayer games. IMO it's somewhat risky to apply the technique to web-apps, since each network request typically corresponds to some important operation, and optimistically updating the UI is lying to the user about whether that operation completed successfully.

IMO a good approach is to update the UI immediately but still show some indication that the operation hasn't completed. So in a chat app, for example, add the message to the list of messages, but with contrast reduced slightly to indicate that other people can't see it yet.

ralferoo•2m ago
I've never used linear, but just watching their example video [1] would worry me if I was a user and it's actually doing what they say it's doing.

He creates a task called "Create faster app launch", if we believe the article, it's processing that locally rather than going via the server, and then it's allocated an ID "BRO-5". That the ID is so low suggests it's just adding one to the previous issue ID, and so under heavy load, there are almost certainly going to be conflicts with other users creating tasks and getting identical IDs. Even if the system resolves this by changing one of those IDs, the system shouldn't be presenting the ID to the user until it is guaranteed unique. What if they've already pasted it into a document when the system notices the collision and renumbers it?

[1] https://media.performance.dev/posts/p_gAMR6Z7y49Fp/NZrXs70M_...

Behind Every Dad Bod Is a Healthy Dad Brain

https://www.nytimes.com/2026/06/06/opinion/dad-brain-health-fatherhood.html
1•mutator•1m ago•0 comments

Modular morals: Mapping the organization of the moral brain (2024)

https://www.sciencedirect.com/science/article/pii/S0278262624000782
1•nativeit•1m ago•0 comments

I built a Discord status for Claude Code

https://www.npmjs.com/package/vibecoder-discord-presence
2•yunexx•5m ago•0 comments

1982 World Championship Double Decker Bus Racing (1982) [video]

https://www.youtube.com/watch?v=7QFhuunZH2E
1•austinallegro•5m ago•0 comments

Try out my version of 1M checkboxes

https://joeheyming.github.io/checkboxes/
1•joeheyming•6m ago•1 comments

Agentic AI solved coding and exposed every other problem in SE

https://venturebeat.com/technology/agentic-ai-solved-coding-and-exposed-every-other-problem-in-so...
1•msolujic•6m ago•0 comments

China has approved the first invasive brain-computer chip

https://www.technologyreview.com/2026/06/01/1138133/china-world-first-brain-chip/
1•sudo_cowsay•9m ago•0 comments

We May Be Entering a Second Axial Age

https://www.noemamag.com/we-may-be-entering-a-second-axial-age/
1•simonebrunozzi•11m ago•0 comments

AI friends too cheap to meter

https://jasmi.news/p/ai-friends
1•simonebrunozzi•15m ago•0 comments

Oxford Uni student data pwned yet again, this time via career platform breach

https://www.theregister.com/security/2026/06/06/oxford-university-data-pwned-again-by-career-plat...
3•Bender•18m ago•0 comments

Show HN: A List of AI Neolabs

https://neolabs-7o2.pages.dev/
2•warthog•18m ago•0 comments

Ask HN: I made an image watermarking tool. What are the issues open-sourcing it?

1•minimaxir•18m ago•0 comments

UK exam watchdog frets over smart specs turning GCSEs into Google searches

https://www.theregister.com/personal-tech/2026/06/07/uk-exam-watchdog-frets-over-smart-specs-turn...
1•Bender•19m ago•0 comments

Stronger Search Architectures Can Substitute for Larger LLMs

https://ttanv.github.io/levi/
1•ttanv•19m ago•0 comments

Do GLP-1 pills work as well as injections? Here's what studies show

https://ktla.com/news/nationworld/do-glp-1-pills-work-as-well-as-injections-heres-what-studies-sh...
1•Bender•20m ago•0 comments

It doesn't always have to be Linux [video]

https://media.ccc.de/v/gpn24-611-it-doesn-t-always-have-to-be-linux-an-intro-to-freebsd
2•birdculture•21m ago•0 comments

Should we ditch the idea of three meals a day?

https://www.theguardian.com/books/2026/jun/07/should-we-ditch-the-idea-of-three-meals-a-day
1•homarp•21m ago•1 comments

Ask HN: Debugging failure in large interconnected back end systems

1•Ifedayo_s•25m ago•0 comments

Quantum Information as Everything

https://vlatkovedral.substack.com/p/quantum-information-as-everything
1•ljosifov•28m ago•0 comments

Programmable artificial RNA condensates in mammalian cells

https://www.nature.com/articles/s41565-026-02164-7
1•PaulHoule•28m ago•0 comments

Why I care so much about energy per token

https://ziraph.com/blog/energy-per-token-vanity-sanity-reality
1•ABS•29m ago•0 comments

The Read Model Zoo: Projections Beyond Tables

https://docs.eventsourcingdb.io/blog/2026/06/08/the-read-model-zoo-projections-beyond-tables/
1•goloroden•29m ago•0 comments

Ideogram 4.0 Technical Details: Open model at the forefront of design

https://ideogram.ai/blog/ideogram-4.0/
1•simonpure•30m ago•0 comments

No Model Will Save Us: Pope Leo, the Miserostat, and AI's Woke Coders

https://www.wmbriggs.com/post/61049/
2•B1FF_PSUVM•31m ago•0 comments

Billions spent and hypothetical returns: the AI boom explained with six charts

https://www.theguardian.com/technology/2026/jun/07/billions-spent-hypothetical-returns-the-ai-boo...
5•billybuckwheat•31m ago•0 comments

ChatGPT app hits 1B monthly active users in record time

https://www.reuters.com/technology/chatgpt-app-hits-1-billion-monthly-active-users-record-time-da...
1•geox•34m ago•0 comments

Why isn't the U.S. better at soccer?

https://www.natesilver.net/p/why-isnt-the-us-better-at-soccer
18•7777777phil•38m ago•11 comments

Show HN: CodeSage Pro – an AI copilot that reads the problem on the page

https://chromewebstore.google.com/detail/codesage-pro-—-universal/cbkkghdedpjamcicmnfpihehmgjemmhi
1•rsingh867•39m ago•0 comments

When robots take over jobs, who decides what they do?

https://lorenzopieri.com/robotic_commons/
2•lorepieri•40m ago•0 comments

Ask HN: What is happening with the Meta Ads dashboard?

1•ramon156•43m ago•0 comments