-
Notifications
You must be signed in to change notification settings - Fork 985
Open
Labels
enhancementNew feature or requestNew feature or requesttriageAwaiting initial review and prioritizationAwaiting initial review and prioritizationv4#4488#4488
Description
Package
v4.x
Description
Currently the ScrollArea component runs measureElement on each item when virtualising, no matter what.
This is quite an expensive function and in a large list it causes layout thrashing.
For a list with items of dynamic size, there is nothing we can do about it afaik.
However, in the case where there is a huge list of components which are all the same size there is no reason to do this calculation on each component. Using the estimateSize instead increases the performance significantly.
Not calling meaureElement does break resizing. If scaled (e.g. responsive design), the virtualizer does not update the rows accordingly...
Additional context
With measureElement:
virtual-list-layout-thrashing.mp4
Without measureElement:
virtual-list-no-layout-trashing.mp4
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesttriageAwaiting initial review and prioritizationAwaiting initial review and prioritizationv4#4488#4488