#4627·Graphite

Virtual scrolling in the layer tree

Author: 0HyperCubeCreated Sep 30, 2026Updated Sep 30, 2026
LabelsPerformance

With 10_000 layers, the layer tree takes 8s to render. This is obviously somewhat unacceptable.

performance profile showing the svelte layer tree taking 8s

By only creating DOM nodes for the layer rows that are visible (usually 10-20) the performance could be improved and could become independent of the number of layers. Since all of the layer rows are the same height it would be trivial to add a spacer at the top and bottom to ensure the scroll bars remain the correct height.

Working towards #4572.

Relevant code: https://github.com/GraphiteEditor/Graphite/blob/55c4e6689b3a99e56749280b9694ffac4037c3e7/frontend/src/components/panels/Layers.svelte#L567-L571