Live data from Hacker News

How's Linear so fast? A technical breakdown

performance.dev

101–110 of 250 posts

Re: How's Linear so fast? A technical breakdown

#101

We use Linear at work. I’m definitely in the minority, but I really struggle with the UX. I also wouldn’t call it fast. Sure the page technically loads reasonably quickly, but half the time I see numbers updating on the page with no visual indicator that data loading is still happening.

Linear has become the thing it sought to kill - complex.

It's really the only way for companies to survive and go up market, unfortunately.

Re: How's Linear so fast? A technical breakdown

#102

We use Linear at work. I’m definitely in the minority, but I really struggle with the UX. I also wouldn’t call it fast. Sure the page technically loads reasonably quickly, but half the time I see numbers updating on the page with no visual indicator that data loading is still happening.

A common problem I have with Linear is that repeated writes sometimes overwrite themselves. Consider this flow

1. type

2. stop to ponder for a split second

3. type some more

4. Linear reverts data to step 1

It's bad enough that I'll use Linear to create issues with a single sentence description. This is what Linear is good and fast at. Then I'll switch to GitHub to fill in the details.

Re: How's Linear so fast? A technical breakdown

#104
post #80

Earlier quoted context omitted.

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.

The goal is - and I think they have achieved it - is that you don't have to think about it. They handle sync, and they do it reliably.

Then they have solved one of the fundamental hard things in computer science.

Re: How's Linear so fast? A technical breakdown

#105

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 ser…

Thank you. Was beginning to feel like I was taking crazy pills seeing people claim that 300ms is fast when 30ms has been the target TTFB for as long as I can remember. Maybe Linear takes more time on the backend for totally valid reasons and it needs some help from the frontend, but that's not generalizable, and every bit of JS comes with its own costs.

When I started in this business, "sub-second" responses were the goal.

Re: How's Linear so fast? A technical breakdown

#106
post #98

Writing an eventually consistent database is hard, it maybe fine for Linear's use cases, but not knowing if my updates made it to the server (aka my team),is problematic. The sync lags have created untold problems in other projects I have worked for, so I always go for a synchronous solution. All the fancy stuff comes out only if it's absolutely needed. I'd rather optimize my server to be blazing fast, and have the u…

Yeah I’ve had inconsistencies before with linear but jira is a garbage fire so…

This is my experience but haven’t used linear in 2 years. Switching to JIRA was miserable.

Re: How's Linear so fast? A technical breakdown

#107
post #92

Earlier quoted context omitted.

(curious) What if a user closes it before 4 seconds? Ctrl+enter, it optimistically locally updates within 1 second. I close ctrl+w. But my wifi goofed and it didn't reach the server.

The HTTP request is fired off instantly, so chances are that the request is already written to the socket and closing the page won't cancel the request. Should your wifi-router drop it, your client will retain the transaction on disk and retry it the next time you come online.

> next time you come online

Yeah that's the issue isn't it? I see in the UI it's sent. But actually it's sent only the next morning.

To be fair. It's fine for an issue tracker. Anything actually important i'd spend a few seconds going over what I just sent. In which case I'd see it's not synced. And what's not that important it's really fine if in some random wifi edge case it's phantom sent. So makes sense.

Re: How's Linear so fast? A technical breakdown

#108

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 ser…

Can you do this where you need to have a database shared between all these edge backends?

Re: How's Linear so fast? A technical breakdown

#109
post #55

Earlier quoted context omitted.

The user clicks the button, the mutation is stored in local storage. The user closes the tab, but it's not a problem. A background worker picks up the mutation and sends it to the remote backend. It takes time, retries, etc. Similarly, any errors reported by the background worker go to local store, and the next time the UI tab is loaded / activated, they are shown. A service worker can show a notification outright to…

Yeah this pattern can be made to work fine. Main downside is it significantly complicates the front end code compared to just waiting for FE to sync with BE before updating

What if we had a local server running on the same PC, which then relays the request to some shared server on the internet?
Post reply on HN