T
TanStack2y ago
rising-crimson

Performance: transforming a block of elements vs each element

In a scenario of fixed item heigh which approach is more performant? The fixed example shows making each row position: absolute and applying transform: translateY to it. Is it shown in the docs because this is more efficient than applying transform: translateY to the whole block of elements (as shown here )? Is the difference documented anywhere? I want to learn more about performance implications of such details.
Svelte Virtual Fixed Example | TanStack Virtual Docs
An example showing how to implement Fixed in Svelte Virtual
Svelte Virtual Dynamic Example | TanStack Virtual Docs
An example showing how to implement Dynamic in Svelte Virtual
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?