If I make a simple implementation like so:
const CustomComponent = (props) => (
<View style={{ alignItems: 'center', justifyContent: 'center', flex: 1 }}>
<Text>{props.item}</Text>
</View>
)
const data = [...new Array(2000)].map((x, i) => `Item ${i}`)
export class Simple extends React.Component<PropsT> {
render() {
return (
<Swiper>
{data.map(x => (
<CustomComponent item={x} />
))}
</Swiper>
)
}
}
As soon as I try to render Simple the app chokes, presumably while trying to instantiate 2000 instances of CustomComponent.
Am I using the library incorrectly? This seems like a crucial performance issue.
I got a bit of a performance improvement when using showsPagination: false with ~500 children. Still a bit slow though.
I was very generous when I generated my mock data - I don't think I will ever really have 500 cards to swipe :)
Maybe loadMinimal?
I have same this issue. I have 7 page, each page have one list data. I must to pay more 7 seconds for render UI, which is so long.
Solution for optimize for this issue ?
Most helpful comment
I have same this issue. I have 7 page, each page have one list data. I must to pay more 7 seconds for render UI, which is so long.
Solution for optimize for this issue ?