I m currently working on a React Native application which aims to provide à huge list of items, using infinite scroll and a local state (no matter the technology / plaform, it's stored in RAM) of the app.
I've currently implemented it the following way :
- 30 items are rendered first
- Scroll to the bottom of the list
- Trigger infinite scroll
- Load 30 more items
Quite simple isn't it ?
The problem sits in the memory allocation. Devices don't own too much RAM, and at a point, the application throws an out of memory exception.
This way, I m asking for a way, or a pattern, to apply while dealing with huge lists like the biggest dev companies do this to avoid our current crashes...
Any suggestions ?
EDIT : actually, I keep a dataset that evolves with time, from 30 to 60, to 90 etc... Inside of the RAM (redux state)