There is a big array, say of length 100. Each array contains a subarray of 50+ items. (Kind of 2-D array)
Rendering everything at one stretch is time consuming and might take more browser memory. Decided to go ahead with chunking the data sets to 5 and render them. That is, chunk the data render then take the next chunk and render it. Based on an interval say of 1second.
How is this achieved in RxJS?
Tried:
Rx.Observable.range(0, 10).map(i => data[i]).subscribe(...)
This takes the first 10 records. So I wrote a recursive function changing the 10 to iterator + 10, but it takes a lot of time to render the array items. Tried using:
Rx.Observable.interval(0, 500).take(data.length).map(i => data[i]).subscribe(...)
This works fine. But this takes 1 to render per 500ms time space. I would like to club first and second. chunk by 10 use 500ms to render and take the next chunk.