react-native-sglistview icon indicating copy to clipboard operation
react-native-sglistview copied to clipboard

Initial render

Open fatonramadani opened this issue 8 years ago • 2 comments

Hi, thanks for the awesome work ! I'm still having a problem: on the initial render, every cell is rendered ( basically every cell downloads a lot of stuff from the internet) which causes the memory to go very high. Then when I scroll down, your module makes the off-screen view empty, and I'm memory goes back to a very low level. Then when I go back up again, the memory stays at the same level.

How can I make it not render the off screen views on the initial render ?

fatonramadani avatar Apr 14 '16 13:04 fatonramadani

That's actually how the stock React-Native ListView element works, so it's not really a bug per se, but more sub-optimal behavior.

I think this would be a good performance improvement for sglistview to implement, but currently that's a feature a request and nothing something sglistview optimizes for.

sghiassy avatar Apr 14 '16 17:04 sghiassy

@DrRazor why are you rending every cell upon startup? Even the core ListView allows you to lazy load content from the internet. Simply way to implement this is subscribe to onEndReached and only then fetch more cels.

@sghiassy Assuming the use case described above SGListView will be able to leverage when new cels are loaded lazily? I'm assuming yes, if not please comment.

rturk avatar Jun 15 '16 01:06 rturk