Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[View] Best practice for large number of views (100s)? #3203
I've built a yearly calendar component that is made up of over 400 views (one per month, one per week, one per day, etc...). Unsurprisingly, performance suffers. Loading takes 3 to 5 seconds on the simulator and device.
I don't need fine-grained interaction at this level, just a
Does React Native have a way to improve the performance of this use case? Or perhaps my component be designed without so many views.
@leafduo might be right. With RN (very long-term idea -- not coming soon or even worked on necessarily...) we can apply the techniques from AsyncDisplayKit such as using CALayers instead of UIViews for certain components, and can also precomposite CALayers so that text and images don't necessarily take up their own CALayer even. A static layout could even have a dozen React components and produce just one CALayer!
Anyway as a more pragmatic solution, I would try a few things:
One of my favorite parts of react native is the ultimate escape hatch - you
It would be nice to create some affordances to optimize this kind of thing
Thanks! Was curious about your approach and glad it's performing a lot