Flipboard / Flipboard/react-canvas

Performance > rendering

Open
#66 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
13.2k
Forks
909
PR merge metrics
No merged PRs in 30d

Description

I've noticed on the examples such as [listView](https://github.com/Flipboard/react-canvas/tree/master/examples/listview) that items are rendered on each scroll event. This works for simple and flat DOM structure but as soon as an item becomes deep and complex, rendering on scroll becomes a bottleneck (renders take more than 16 ms).

Even if I cache the items in ListView instead of calling the getter, the render methods on the children are still called. It seems to be due to this [line](https://github.com/Flipboard/react-canvas/blob/master/lib/Group.js#L24). Do you have any suggestions to avoid rendering so frequently?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.