Live data from Hacker News

How's Linear so fast? A technical breakdown

performance.dev

161–170 of 250 posts

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

#161
post #135

Earlier quoted context omitted.

100% agree. A traditional CRUD app (like Linear) can be made pretty low latency without local-first. The complexity is not worth it.

How would you do it? The speed of light being what it is, and tail latencies being large unless you over provision wildly, you keep facing hundreds of milliseconds of reconciliation time, if you want guaranteed synchronous result.

I said it in another thread. Yes, of course we cannot match the local store interactivity. What I mean is coast to coast RTT is 65-80ms. And the server can be optimized to return back basic operations (adding a comment, a new ticket, reading one back etc) can be done within tens of milliseconds, keeping the entire thing under 100ms coast-to-coast. If one can colocate servers with users, it becomes even less. I'd rather to server side "reconciliation" than do both (because serverside thing doesnt go away even with localstore, it is just deferred).

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

#162
post #154

Earlier quoted context omitted.

you can home tenants in a data center close to them, run a copy of your app in each region including the datastore. keep a central db for accounts, billing, etc but user content is easy enough to shard regionally. taken to extreme, cloudflare durable objects & workers let you place data very close to a tenant automatically; but you lose total write throughput on top of sqlite.

But this is kind of meaningless unless the tenants themselves are in one geo. Take linear as an example, this strategy works as long as your company that uses linear is all colocated in one area. As soon as you have remote people it falls apart.

But it does mean you gracefully degrade so the majority of the company sees the target latency <100ms and the rest of the company sees "not geo-optimized" latency.

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

#163

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?

If your service shares state globally across all users (like a social network) not really. If individual customers are mostly centered around one geographic location and their data isn't shared with other customers, yes.

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

#164

Earlier quoted context omitted.

I honesty can’t say it’s better than Jira, the myriad options just make it a confusing mess to figure out how to navigate and put stuff (could be my company is just hella disorganized), and the GitHub tracking is annoyingly eager (just because the first PR has been merged doesn’t mean the ticket is done).

Say what you will about Jira, at least it’s not a total maze.

Guess you've never seen the administrative side?

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

#165

If you're interested in this kind of experience for your application, check out Zero ( https://zero.rocicorp.dev/ ). Live demo: https://gigabugs.rocicorp.dev/ . We also list some alternatives here: https://zero.rocicorp.dev/docs/when-to-use#alternatives . If you're interested in how these things work internally, check out the Replicache design doc: https://doc.replicache.dev/concepts/how-it-works . Replicache was the…

user as well; this is exactly the tool if you want a UX where the UI instantly update itself once database changes within milliseconds.

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

#166

If you're interested in this kind of experience for your application, check out Zero ( https://zero.rocicorp.dev/ ). Live demo: https://gigabugs.rocicorp.dev/ . We also list some alternatives here: https://zero.rocicorp.dev/docs/when-to-use#alternatives . If you're interested in how these things work internally, check out the Replicache design doc: https://doc.replicache.dev/concepts/how-it-works . Replicache was the…

Can't recommend Zero enough. It's a really thoughtful piece of software with great abstractions. As well as the obvious performance benefits arising from having data synced and available in the client, I've been blown away by how much it simplifies React code. With a sync engine in place, most client-side state seems to evaporate, you get to think synchronously in most component code, etc.

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

#167
post #160

Focusing on making things actually fast is always better than putting a cache or some hack on it. Linear IS essentially a crud app so saying crud app does it in 300ms doesn't mean anything in this context imo. If you have a database stack that is actually fast. And you can use something that is actually fast on the frontend like solidjs. Then you might have something that is actually fast. But putting more complexity…

When you say most people have more than 100mb/s, 4 cores and 8gb Do you mean USA and other developed countries? Or the world

I mean the people using linear

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

#168
This is cool! Maybe I can incorporate something similar into the browser game and engine I’m developing to remove load states entirely after first load? My thing is fully client side static assets no server.

For context I’ve been obsessed with performance with this game. Prior to this weekend I was struggling to simulate 128 simultaneous players (pathfinding, heavy strategy logic, rendering, all in viewport) and maintaining 120fps on an m1 MacBook Pro - I’d get a very occasional frame drop and my performance was sitting at around 4ms frame times

During the weekend I did very heavy-handed performance sessions and can now simulate 2048 simultaneous players with sub millisecond frame times - that includes all rendering and all logic and includes things like proc gen too.

Further - I’ve been simulating a throttled device with 11.2x cpu throttling (a potato / beet low end mobile devices) and can get stable 60fps at around 256-512 simultaneous players and around 5ms frame times.

My main culprits now are some slight logic issues and startup / boot times which I need to improve on potato devices. I reckon I could take some learnings from linear.

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

#169
post #154

Earlier quoted context omitted.

> 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. What are you talking about? The only AWS region https://www.cloudping.co/ us-west-1 is 60ms away. eu-centra-1 is 100ms away. asia is 200ms away. and this is datacenter-to-datacenter traffic. Actual latency over the public internet to residential providers is far worse. Your database nee…

you can home tenants in a data center close to them, run a copy of your app in each region including the datastore. keep a central db for accounts, billing, etc but user content is easy enough to shard regionally. taken to extreme, cloudflare durable objects & workers let you place data very close to a tenant automatically; but you lose total write throughput on top of sqlite.

This breaks down when someone goes on holiday to Greece for a week, and the RTT over the airbnb wifi is 5 seconds.

Optimistic updates on the frontend are probably simpler too.

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

#170

I would always hear about how Linear was fast, but after actually working daily with it, I’ve lost enthusiasm. Search is quite slow, the UI is often clunky (looks good though), “Pulse” is a torrent of noise even at small scale, and I have trouble finding things I need and resort to adding everything to favorites. Early days’ Trello was the best project tracking experience by far.

I love when I try to pull up a ticket during a meeting or a huddle and then awkwardly watch it loading/caching or w/e its doing for an inordinate amount of time.
Post reply on HN