Latest / The CTO Podcast with Fexingo: Technical Leadership, Architecture, and Engineering Org / How Figma Cut Prototype Latency by 60 Percent
Transcript
- Lucas: So there's a number that's been stuck in my head all week: sixty percent. That's how much Figma managed to cut prototype latency, and they did it without rewriting their entire product. Luna: Sixty percent is huge. And I remember when Figma first shipped prototypes, they were already pretty fast. How did they squeeze out that much more? Lucas: Well, it's a classic story of moving work closer to the user. But the details are what matter. They basically took a hard look at their request-response model and realized that a lot of the latency was baked into the round trips. Luna: So they went from asking the server to do everything, to pushing computation to the client? Lucas: Exactly. They started by identifying which operations could run locally. Things like interpolating animation frames, calculating layout adjustments, even some state transitions. By moving those to the client, they eliminated a whole class of network delays. Luna: But doesn't that create consistency issues? If different clients are computing different things, how do you keep everyone in sync? Lucas: That's the clever part. They didn't move everything. They kept a central source of truth for the document model, but they made the client smart enough to predict and pre-compute. So when you're dragging a slider, the client is running the animation locally, and only syncing the final state back. Luna: So it's like optimistic UI, but for the whole prototype engine. Lucas: Right. And they took it further with WebAssembly. They compiled some of their core logic into WASM, which runs much faster than JavaScript for certain math-heavy operations. That gave them another big win on the client side. Luna: I've heard WebAssembly is great for performance, but it can be a pain to integrate. How did they manage that without breaking their build? Lucas: They were smart about it. They started with just a few critical modules, wrapped them in a clean JavaScript API, and then gradually moved more over as they validated the performance gains. It wasn't a big bang rewrite. Luna: So incremental adoption. That's a good lesson for any team looking to adopt WASM. Lucas: Definitely. But the other big piece was caching. They introduced a multi-layered caching strategy, both on the server and in the browser. For static assets like fonts and icons, they went all-in on CDN caching with long cache lifetimes. For dynamic data, they used short-lived caches with invalidation based on document changes. Luna: So they're trading a little bit of freshness for a lot of speed. Is that a fair trade for a collaborative tool? Lucas: It can be, if you're careful. Figma was careful to keep the cache consistent with the source of truth. They used version vectors to track changes, so when you save a prototype, the cache is invalidated across all clients. It's a classic trade-off, but they managed to make it work. Luna: They also moved some of their backend logic to edge functions, right? Lucas: Yeah, that was a big one. By running authentication checks and some basic data fetching at the edge, they cut down the distance between the user and the server. For a global product like Figma, that shaved off tens of milliseconds per request, which adds up quickly. Luna: So it's a combination of client-side computation, WebAssembly, caching, and edge computing. But what was the hardest part? Lucas: I think the hardest part was making sure they didn't introduce bugs while making the system more complex. They had to build a robust testing framework to verify that the client-side logic matched the server-side behavior. And they invested in observability, tracing every request and response to see where latency was coming from. Luna: That's a lot of moving parts. How did they keep the engineering team from being overwhelmed? Lucas: They organized the work into small, focused teams, each owning one piece of the latency puzzle. One team owned the client-side engine, another owned the caching layer, and a third owned the edge functions. That way, each team could move fast without stepping on each other's toes. Luna: So it's also a lesson in team structure. You don't just throw a bunch of engineers at a performance problem; you need clear ownership. Lucas: Exactly. And they kept a tight feedback loop with their users. They rolled out the changes gradually, using feature flags, and monitored real-world usage to make sure the improvements actually felt faster to people. Luna: I love that they didn't just rely on lab benchmarks. Real-world perception is what matters. Lucas: And that's a huge part of why they succeeded. They didn't just aim for a number; they aimed for a feeling. When you drag a slider in a Figma prototype now, it feels instant. That's the kind of thing that makes users stick around. Luna: I think that's a good place to talk about something else that's been on my mind. You know, we do this show without any ads, and that's only possible because a handful of listeners chip in monthly through buy me a coffee dot com slash fexingo. It's not a huge number, but it literally funds making this many episodes. Lucas: Yeah, it's a community effort. And we're grateful for every single person who does that because it keeps us independent and ad-free. If you find these conversations useful for what you're building or running, that's a simple way to give back. Luna: And we don't say that to put pressure on anyone. We just believe in transparency about how the show works. Now, back to Figma—one thing I'm curious about is the long-term impact of these changes. Do you think they can keep pushing performance further? Lucas: Oh, absolutely. There's still a lot of room on the client side. They're exploring more WASM modules and even some GPU acceleration for rendering. And as edge computing matures, they'll be able to move even more logic closer to the user. Luna: So it's not a one-time win; it's an ongoing philosophy of optimizing the user experience. Lucas: Exactly. And that's what separates the best tech companies from the rest. It's not about a single clever hack; it's about building a culture that values speed and constantly looks for ways to improve. Luna: Well, I think we can all learn something from that. Thanks for breaking it down, Lucas. Lucas: My pleasure. And next time you're building a feature, ask yourself: can I do this on the client? You might be surprised by how much latency you can cut.