Issue
I have 25-30 items in my FlatLis but I don't render all of them initially, I am fetching more and more when user reaches the end. After 24-25 images, I am getting this error on some particular android devices and emulators:
Pool hard cap violation? Hard cap = 150994944 Used size = 150539928 Free size = 0 Request size = 1680000
This error coming from Image's onError prop.
the invidiual item looks like this;
<Image
ref={imageRef}
onError={async (e) => {
console.log('IMAGE LOAD error', e.nativeEvent.error);
}}
{...props}
source={source}
onLoadEnd={onLoadEnd}
resizeMode="cover"
/>
Each image is around 200kb so the size shouldn't be a problem I suppose.
Solution
Solved this by using windowSize
and removedClippedSubviews
props from FlatList
. I set windowSize
to 5 for android devices.
Answered By - İlker
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.