Lag on iPhone 8 & higher

Hi ! I’m writing this new topic because I have problems to make my apps work on iPhone 8 & higher. It seems that when I have a list (FlatList or SectionList) with many elements in it (~20) or when I’m using react-native-tab-view sometimes, lag appears and the phone is nearly freezing (take 30 seconds between button clicked and action executed).

My friend have this problem too so I’m really confused why there is no topic on this huge problem. I found one topic a bit similar (Section List Lag on iPhone X iOS 11.4) but it was closed 3 months ago…

I tested my apps on SDK 28, 29 & 30 but I still have this problem. My lists are optimized with PureComponent and my elements are rendered only once (I repeat, it works perfectly on iPhone 7 and lower). Thanks for your answer !

You need to share some code here… :wink:

The thing is that there is no specific code that produce the lag. Like I said, in total we have 3 apps with different lists (lists with images, list with videos, list with just text) and it produces a very laggy unresponsive experience in this new iPhone. I would like to share some code but I don’t know if it’s the right solution. Why is it working on iPhone 6 and Android devices and not in iPhone 8 and higher ?

EDIT: I’ll try to build a simple case on Snack ! I need a bit of time, I just wanted to know if there is other case like me

Omg, I fixed the issue ! It was an old hidden onLayout callback that is called forever and ever in iPhone 8 & higher. The height was flickering for some reason (onLayout was called with height between 40.33349609375 and 40.3330078125 in an infinite loop…). I think it’s due to the Icon inside the container, it’s a custom icon from a custom icon font. If I remove it, everything is fine

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.