Latest / The CTO Podcast with Fexingo: Technical Leadership, Architecture, and Engineering Org / How Figma Cut Prototype Latency by 60 Percent
Transcript
- Lucas: So last week I was clicking through a Figma prototype, and it hit me — how much of that smoothness is actually the underlying engine, not just the design. Luna: You're talking about the difference between a prototype that feels instant and one that makes you wait a beat on every transition. Lucas: Exactly. And Figma recently shared that they cut prototype latency by 60 percent — not by tweaking a few animations, but by rethinking how the multiplayer engine syncs state. I wanted to dig into that because it's a masterclass in architectural trade-offs. Luna: What was the core problem they were solving? Lucas: For years, Figma's engine used a centralized model — every client sends changes to a server, and the server broadcasts them out. That works fine for static documents, but with prototypes, you have interactive states, animations, variables — and every action feels the round trip. Luna: So the server was becoming the bottleneck. Lucas: Right. And the team noticed that prototype interactions were especially sensitive — even 50 milliseconds of added latency felt sluggish. So they set a hard goal: cut perceived latency by at least half. Luna: How did they get there? Did they just add more edge servers? Lucas: They considered that, but the real insight was to shift to a local-first model. They moved most of the state management onto the client, so actions like starting an animation or toggling a variable resolve locally — no round trip unless absolutely required. Luna: That sounds like a big architectural change. How did they keep collaboration in sync? Lucas: That's where CRDTs come in — conflict-free replicated data types. Figma had already used CRDTs for document editing, but they extended that to the prototype runtime. Now every client holds a replica of the state and syncs changes peer to peer, with the server as a relay for persistence. Luna: So the server isn't the source of truth anymore? Lucas: For transient state, no. They kept the server authoritative for persistence and conflict resolution, but the immediate interactions are handled locally. That's how they got the 60 percent reduction — most actions never leave the device. Luna: That's a pretty huge shift in mindset. Was there any pushback from the team? Lucas: Oh, definitely. A lot of engineers were worried about complexity. Keeping multiple replicas in sync is hard — you have to think about merge semantics, ordering, and eventual consistency. But the team framed it as a performance investment, not just a rewrite. Luna: How did they measure success? Did they just look at internal metrics, or did they involve users? Lucas: They used a combination of synthetic benchmarks and real-user monitoring. They tracked time to interaction for key prototype actions, and they also did user studies where people rated perceived responsiveness. The correlation between the two was tight — when the numbers went down, the perception went up. Luna: It's interesting that they focused on perceived latency, not just raw milliseconds. Lucas: Because that's what actually matters. A 60 percent reduction sounds great, but if users don't feel it, it's wasted effort. They made sure to validate that the change felt better, not just measured better. Luna: I imagine there were some tricky edge cases — what happens when two people interact with the same prototype simultaneously? Lucas: Great question. With CRDTs, they handle concurrent edits using operational transforms — but they had to define what 'editing' means for a prototype. For example, if one person changes a variable while another triggers an animation, those operations need to compose. They spent a lot of time on that logic. Luna: So it's not just a simple swap of the sync layer. Lucas: No, and that's the lesson. You can't just bolt on local-first — you have to redesign the state model. Figma actually rewrote the prototype runtime from scratch, not just the networking layer. Luna: That's a big bet. What did they do to de-risk it? Lucas: They ran a shadow deployment — the new engine ran alongside the old one in production, but all traffic was still served by the old engine. They compared outcomes for weeks before flipping the switch. That gave them confidence that the new architecture was stable. Luna: That's the kind of rigor I appreciate. So what's the takeaway for other CTOs? Lucas: The biggest one is: know where your latency is coming from. Figma realized that the server round trip was the dominant factor — not the rendering, not the animation logic. Once they identified that, they could make a targeted architectural change instead of optimizing the wrong layer. Luna: And it's a good reminder that sometimes you need to question your core assumptions — like, do we really need the server for every interaction? Lucas: Exactly. And that's something every team building collaborative or interactive software should think about. The cost of a round trip might be negligible for some apps, but for latency-sensitive experiences, local-first is becoming a serious option. Luna: It also shows the value of having a strong engineering culture that can handle that kind of change. Lucas: Absolutely. And you know, it's conversations like this that make the show possible. If you're getting something out of these deep dives, a couple of dollars a month is genuinely what keeps these going — buy me a coffee dot com slash fexingo, if you've gotten something out of them. Luna: Yeah, it really does make a difference. We appreciate everyone who supports the show. Lucas: So, back to Figma — one thing I found fascinating is how they handled the transition for existing prototypes. They had to make sure that anything built on the old engine would still work perfectly on the new one. That's a compatibility nightmare. Luna: How did they manage that? Lucas: They built a compatibility layer that could interpret the old prototype definitions and map them to the new state model. It wasn't perfect, but they caught most edge cases in testing. And they gave users a way to report issues directly from the prototype player. Luna: That's a good example of thinking about the whole ecosystem, not just the core engine. Lucas: Right. And they also documented the migration for plugin developers, because a lot of plugins interact with prototype state. They wanted to make sure the developer ecosystem wasn't left behind. Luna: So what's next for Figma's prototype engine? Do you think they'll push even more to the edge? Lucas: I wouldn't be surprised. The team has hinted at exploring client-side prediction and even offline support. The line between local and remote is going to blur even more, and that's exciting. Luna: It feels like we're moving toward a world where the server is just a coordinator, not the brain. Lucas: Exactly. And the lesson for any CTO is: don't be afraid to challenge the architecture you have, even if it's been working for years. Sometimes the biggest performance wins come from questioning the fundamental flow of data. Luna: Well said. That's a wrap for today — thanks for listening, everyone. Lucas: And if you're curious about the technical details, we'll link some resources in the show notes. Until next time.