figma.com · Free post · Execution, roadmaps & process · Metrics, data & experimentation

Keeping Figma fast

FigmaAug 28, 202314 min
Sourcefigma.com
KindFree post
PublishedAug 28, 2023
Originalfigma.com ↗
N:

Figma overhauled its performance testing infrastructure from a single MacBook to a dual-system approach combining cloud-based VMs and real hardware. As the product scaled to 400+ engineers, thousands of features, and distributed teams, the original testing setup became unsustainable. The new system runs performance checks on every pull request in under 10 minutes, catching regressions early and enabling proactive optimization across Figma and FigJam. This shift from reactive to proactive performance work required rethinking how to balance speed, accuracy, and scalability.

01Key takeaways

  • Move from reactive (fixing user-reported bugs) to proactive performance testing by catching regressions in CI before code ships.
  • Combine cloud VMs for broad regression detection with real hardware for precise debugging; each serves different accuracy and speed needs.
  • Set realistic pass margins (e.g., 20%) in virtualized environments to filter noise while catching egregious regressions like O(n) to O(n²) shifts.
  • Test end-to-end in the browser rather than isolated components to catch complex issues involving WebGL, CSS, and framework interactions.
  • Empower domain experts and distributed teams with accessible performance data, CPU profiles, and shareable reports to drive optimization decisions.
  • Expect performance bottlenecks to surprise you; systematic benchmarking and detailed metrics reveal what intuition misses.

02Key sections

The MacBook's limits
A single laptop running tests became impractical as Figma's codebase grew, the team expanded to 400+ engineers shipping daily changes, and remote work made physical access impossible. The system couldn't represent edge cases or keep pace with feature velocity.
Design requirements
Figma needed a system that tests every code change early, completes in under 10 minutes, runs in parallel, and provides detailed performance metrics and CPU profiles. The challenge was balancing speed with accuracy on a graphics-heavy, multiplayer-collaborative application.
Dual-system architecture
A cloud-based VM system catches obvious regressions across all pull requests with a 20% pass margin to tolerate noise. A hardware system on real devices enables targeted debugging, bisecting subtle issues, and validating optimizations on older machines.
Rendering performance case study
Using stress tests with thousands of layers and 50 multiplayer users, engineers identified that time-slicing of rendering prioritized local edits over remote changes, improving perceived frame rates on slower devices without hurting newer hardware.
FigJam optimization case study
Automated tests caught performance regressions before production, including a subtle CSS bug (background-filter: blur) affecting Safari compositing. The framework enabled cross-team collaboration and prevented regressions from innocent-looking code changes.
Scaling performance culture
With no single person understanding all product nuances, systematic testing and benchmarking became essential. Remote on-demand runs, detailed reporting, and shared metrics enable distributed teams to collaborate on performance-sensitive work across time zones.
“Imagine the frustration of trying to pound in a nail when the hammer trails behind your hand by half a second.”Figma · figma.com
“We know that many of our users spend hours a day in Figma; even a small lag can cause major hiccups in their workflows.”Figma · figma.com

03Frameworks mentioned

Summary and takeaways written by PM Atlas; quotes are short excerpts. © the original author.