---
title: "Improving performance in the layers panel"
description: "Figma rebuilt its layers panel to fix two problems: it computed data for every expanded node, and it recomputed everything after any change."
url: "https://swe.quest/articles/improving-performance-in-the-layers-panel-1cd0d897a08e1393"
canonical: "https://www.figma.com/blog/improving-performance-in-the-layers-panel/"
source: "Figma"
published: "2026-06-11"
difficulty: "medium"
kind: "Case study"
reading_minutes: 8
tags: ["performance","frontend","caching","data-structures"]
---

# Improving performance in the layers panel

A post on [Figma](https://swe.quest/sources/figma.md), published 2026-06-11, 8 min read, Case study. Original: [https://www.figma.com/blog/improving-performance-in-the-layers-panel/](https://www.figma.com/blog/improving-performance-in-the-layers-panel/)

## Summary

Figma rebuilt its layers panel to fix two problems: it computed data for every expanded node, and it recomputed everything after any change. Splitting data gathering into two passes means full row data is computed only for the few dozen windowed rows. Modeling the row tree with lazy, cached derived properties (spreadsheet-like dependency tracking) means only the affected subtree recomputes. A rope-like recursive list for cached ordered children avoids O(n²) memory, cutting memory by up to 99%, and key interactions got 30–50% faster in large files, with smoother editing overall.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Frontend](https://swe.quest/tags/frontend.md) (Web & mobile)
- [Caching](https://swe.quest/tags/caching.md) (Backend & APIs)
- [Data structures](https://swe.quest/tags/data-structures.md) (Architecture & design)

## Prerequisites

- UI list virtualization ([easy posts on Virtualization](https://swe.quest/tags/virtualization.md?difficulty=easy))
- tree data structures ([easy posts on Data structures](https://swe.quest/tags/data-structures.md?difficulty=easy))
- memoization and caching ([easy posts on Caching](https://swe.quest/tags/caching.md?difficulty=easy))

## Keywords

Figma, layers panel, derived properties, windowing, rope data structure

## Related posts

- [Speeding up file load times, one page at a time](https://swe.quest/articles/speeding-up-file-load-times-one-page-at-a-time-6f46ca8213350490.md): Figma · 2024-05-22 · Medium · 13 min read · Web performance, Real-time systems, Data structures, System design
  Figma extended dynamic page loading from view-only files and prototypes to editable files, cutting load times for the slowest 5% of loads by 33% and reducing client memory.
- [Version control: Three ways Figma explored horizontal scrolling](https://swe.quest/articles/version-control-three-ways-figma-explored-horizontal-scrolling-b5d14a196ba742eb.md): Figma · 2025-04-16 · Medium · 7 min read · Frontend, Product engineering, React
  Adding horizontal scrolling to Figma's Layers panel was harder than expected because the list is virtualized (only visible rows render), rows are interactive (hide, lock, collapse, rename), and layer names vary in length.
- [How we rebuilt the foundations of component instances](https://swe.quest/articles/how-we-rebuilt-the-foundations-of-component-instances-eee24bf669da62cd.md): Figma · 2026-03-17 · Medium · 9 min read · Frontend, Performance engineering, Refactoring & migrations, System design, Design systems
  Figma replaced its decade-old Instance Updater, a self-contained runtime that resolved component instances and also did its own layout and variable evaluation, with Materializer, a generic framework for deriving subtrees of the document tree from feature-defined blueprints.
- [Supporting faster file load times with memory optimizations in Rust](https://swe.quest/articles/supporting-faster-file-load-times-with-memory-optimizations-in-rust-9b748f81216508a0.md): Figma · 2025-06-18 · Medium · 6 min read · Rust, Memory management, Performance engineering, Data structures, Real-time systems
  Figma's Rust multiplayer server represented each file node as a BTreeMap from u16 property IDs to pointers, and memory profiling showed this map used over 60% of a file's memory.
- [Improving performance with incremental frame loading](https://swe.quest/articles/improving-performance-with-incremental-frame-loading-2561f28b61e84c3a.md): Figma · 2024-01-23 · Medium · 8 min read · Web performance, Real-time systems, Memory management, Performance engineering, System design
  Figma's prototype player used to load entire documents into memory, causing multi-minute loads and crashes on memory-constrained mobile devices.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
