How to achieve 120fps on SDUI list #2511
kriptonian1
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
What we're rendering
Our home feed is server-driven. The backend sends a list of widgets and a widget factory maps each one to a component: banners, product carousels, category grids, restaurant sections, a sticky filters strip. Every widget type has its own height, so the list is genuinely heterogeneous, no two adjacent cells are the same shape or size.
We're on FlatList rather than FlashList for this screen. Recycling assumes cells are interchangeable, and ours aren't, so when a tall product grid gets recycled into a short banner slot we get mismeasured and misplaced cells. FlatList sidesteps that, at the cost of the fast-scroll problem below.
The cells are also expensive. A single screen can pull in several large remote images (expo-image), a couple of Reanimated-driven components, and a Lottie animation or two. Nothing exotic on its own, but stacked in one row it adds up.
The goal
The target is a locked 120fps on ProMotion / high-refresh displays. Right now scrolling stutters. The list doesn't blank out, the content is there, but the scroll judders instead of gliding, and you can feel the frame rate drop as heavier cells come into the window. It's most obvious on a fast scroll through the image and animation heavy rows. You can see the jitter and the frame drops in the video below.
The jitter (video)
https://drive.google.com/file/d/1_cXyIZuCYtEhCekxRMHfL9WmpN7ibLh-/view?usp=sharing
What we've already tuned
Current windowing on this list:
maxToRenderPerBatchis low on purpose so we don't block the JS thread rendering a burst of heavy cells. Raising it renders more per pass but stalls the JS thread and makes the stutter worse; lowering it doesn't get us to a smooth 120fps either. We haven't found a windowing combination that keeps the scroll smooth through the heavy rows.Environment
All reactions