Figma

How WebAssembly cut Figma's load time by more than 3x

Figma's editor is C++ compiled for the browser. Switching from asm.js to WebAssembly made loading more than 3x faster, mostly by removing parse and compile work, not download size.

Based on WebAssembly cut Figma's load time by 3x by Evan Wallace (Figma, 8 June 2017).

6 min read · Bloom is not affiliated with Figma. Read the original for the full story.

TL;DR

  • Figma's editor is written in C++ with a WebGL rendering engine and compiled to run in the browser.
  • Moving from asm.js (a JavaScript subset) to WebAssembly made load time more than 3x faster across document sizes.
  • The win came from parsing and compilation: WebAssembly parses around 20x faster than asm.js, and browsers can cache the compiled machine code.
  • Download size barely changed. The lesson is about CPU time spent turning code into something runnable, not bytes.

The setup

Figma runs a design tool in the browser, with a C++ core and a 2D WebGL rendering engine built to handle very large documents. To run C++ on the web, Figma compiled it with Emscripten to asm.js: a strict subset of JavaScript that browsers could optimize well.

asm.js worked, but it had a cost that grows with the size of the app: before running anything, the browser must parse and compile a very large JavaScript file, and JavaScript's text syntax isn't designed to be parsed quickly.

Why WebAssembly loads faster

WebAssembly is a binary code format designed for the browser. The article identifies three reasons it beat asm.js on load time:

  1. Parsing is much faster. The binary format was designed to be decoded quickly; the article cites parsing at around 20x faster than asm.js.
  2. Compiled code can be cached. Browsers can easily cache the translation from WebAssembly to native machine code, so repeat visits skip most compilation work. asm.js had no comparable mechanism.
  3. The optimization happens ahead of time. The C++ is heavily optimized by the LLVM toolchain before it becomes WebAssembly, so the browser can translate it straight to machine code without its own expensive optimization passes.

Measured over different document sizes, including initialization, download, and first render, load time improved by more than 3x.

What didn't change, and the caveats at the time

The compressed download size barely changed compared with asm.js. That's the key insight: for large compiled apps, the bottleneck wasn't the network, it was the CPU work of turning code into something executable.

The article was written in 2017, and it notes caveats from that time: only Firefox and Chrome supported WebAssembly, Figma initially enabled it only in Firefox because of Chrome bugs affecting caching and stability, and they kept producing asm.js builds for debugging. WebAssembly has since become supported in all major browsers.

  asm.js:  download ─▶ parse huge JS text (slow) ─▶ compile & optimize ─▶ run
  wasm:    download ─▶ decode binary (fast) ─▶ translate to machine code ─▶ run
                       repeat visits: cached machine code ─▶ run
  download size: about the same   |   load time: more than 3x faster
Where load time went (simplified)

Key decisions and trade-offs

DecisionWhyTrade-off
Compile the C++ core to WebAssembly instead of asm.jsFast binary decoding, cacheable compiled code, and optimization done ahead of time.In 2017, limited browser support and browser bugs required fallbacks and gradual enablement.
Keep asm.js buildsUseful for debugging while WebAssembly tooling was young.Two build targets to maintain.

What this means for your frontend

  • When load is slow, measure parse and compile time, not just bytes. Chrome DevTools' Performance panel shows script evaluation and compile costs.
  • Shipping less JavaScript helps twice: fewer bytes to download and less code to parse, compile, and execute on slow phones.
  • WebAssembly fits CPU-heavy cores (image processing, editors, codecs, simulations). It doesn't replace JavaScript for typical UI code.
  • Use caching that saves CPU, not just network: code caching and long-lived immutable assets let repeat visits skip work.

Check your understanding

According to Figma, what mainly made WebAssembly load faster than asm.js?

What's the general lesson for large JavaScript apps?

Go deeper on Bloom

Explainer written 22 October 2026.