Latest / The CTO Podcast with Fexingo: Technical Leadership, Architecture, and Engineering Org / How Figma Rebuilt Its Plugin Platform for 1000 Extensions
Transcript
- Lucas: So Figma now has over 1000 community plugins, and almost nobody talks about the architectural shift that made that possible without breaking the core editor. Luna: I remember when plugins felt like an afterthought — you'd install one and the whole app would stutter. What changed? Lucas: The original plugin system ran everything in the same JavaScript context as the editor. That meant a single badly written plugin could freeze the canvas for everyone on the team. Luna: Yeah, that's a hard no for a real-time collaboration tool. So they had to sandbox. Lucas: Right. But sandboxing in a browser isn't trivial. You can't just throw every plugin into an iframe and call it a day, because iframes break access to the DOM and the Canvas API that plugins need to actually draw things. Lucas: What Figma ended up doing was building a custom WebAssembly-based runtime — a lightweight JavaScript isolate that runs plugin code in a separate thread. Each plugin gets its own memory space and its own event loop. Luna: That sounds like a lot of engineering overhead for what's supposed to be a third-party extension. How did they justify the investment? Lucas: Good question. The trigger was a single plugin — a colour palette tool called Hexpiler — that was so popular it accounted for 15 percent of all plugin installs. But when users ran it alongside other plugins, the whole editor would crash. Luna: Hexpiler — yeah, I've used that. It was great until it wasn't. Lucas: Exactly. So Figma's engineering team realised that the old architecture was a scaling bottleneck. They couldn't just fix Hexpiler; they had to build a platform that isolated each plugin from the others and from the core. Luna: And the WebAssembly approach — did it actually improve performance, or just safety? Lucas: Both, surprisingly. The isolate model means each plugin runs in its own thread, so heavy computation doesn't block the main rendering thread. After the migration, the average plugin response time dropped by 40 percent. Lucas: But there was a trade-off. The new API is more restrictive — plugins can't directly mutate the document model anymore. They have to go through a message-passing layer that serialises and validates every change. Luna: That must have broken a lot of existing plugins. How did they handle the migration? Lucas: They gave developers a six-month deprecation window with a backward-compatibility shim. The shim emulated the old API on top of the new one, but with a performance warning. About 80 percent of plugins were updated within the first three months. Luna: That's actually impressive adoption. Usually developers resist breaking changes. Lucas: Yeah, the thing is, the performance improvement was so noticeable — especially on larger files — that plugin authors had an incentive to upgrade. A plugin like Hexpiler saw its load time go from 2.3 seconds to 0.8 seconds. Luna: Quick honest thing — a handful of listeners chip in monthly through buy me a coffee dot com slash fexingo, and that's literally what funds making this many of these episodes. Lucas: Yeah, we keep the show ad-free because of that support. It's a small group, but it makes a real difference for us. Luna: Back to Figma — the isolate model also opened up something unexpected: parallel plugin execution. Lucas: Exactly. Before, plugins ran sequentially. If you had two plugins that both analysed the selection, they'd queue up and the second one would wait for the first to finish. Now they can run in parallel, which is huge for workflows like accessibility auditing. Luna: So the architecture actually changed what users could do, not just how fast they could do it. Lucas: Right. One designer I talked to said she now runs three plugins simultaneously on every design review — a contrast checker, a layout validator, and a component linter — and it's faster than running just one before the overhaul. Lucas: But there's a subtlety here. WebAssembly isolates aren't free. Each one consumes about 4 megabytes of memory just for the runtime. With 1000 plugins installed — even if only a few are active at a time — that adds up. Luna: Four megabytes per isolate sounds manageable for a desktop app, but Figma runs in the browser. How did they handle memory pressure? Lucas: They implemented lazy loading and idle-time garbage collection. A plugin isn't actually instantiated until the user triggers it. And when a plugin hasn't been used for 30 minutes, its isolate is serialised to compressed storage and freed from memory. Luna: That's clever. So the user experience stays snappy even if someone has a hundred plugins installed. Lucas: Exactly. And the serialisation format they used — it's a custom binary schema, not JSON. They claim it's 10 times faster to deserialise than a typical JSON blob. Lucas: The whole project took about nine months from design to full rollout, with a team of seven engineers. That's a pretty lean team for a core infrastructure change. Luna: Seven people? That's surprising. I'd expect a platform rewrite to have a much bigger team. Lucas: Well, they kept the scope narrow. They didn't try to redesign the API surface or add new features. The goal was purely to isolate plugin execution without changing how plugins look to users. That constraint kept the project from growing. Luna: So the lesson is: limit your scope to the hard technical problem, and defer everything else. Lucas: I think that's a good takeaway. Figma's plugin platform is now more scalable, more secure, and surprisingly faster — all because they invested in an architectural pattern that most users will never see. Luna: Makes you wonder what other platforms could benefit from a similar isolate-based approach. Lucas: Yeah. A lot of collaborative tools still run extensions in-process. I'd bet we'll see more of this WebAssembly isolate model in the next couple of years.