mirror of
https://github.com/status-im/react-native.git
synced 2025-02-08 23:53:27 +00:00
Summary: Incremental rendering is a tradeoff between throughput and responsiveness because it yields. When we have plenty of buffer (say 50% of the target), we render incrementally to keep the app responsive. If we are dangerously low on buffer (say below 25%) we always disable incremental to try to catch up as fast as possible. In between, we only disable incremental while actively scrolling since it's unlikely the user will try to press a button while scrolling. This also optimizes some things then incremental is switching back and forth. I played around with making the render window itself adaptive, but it seems pretty futile to predict - once the user decides to scroll quickly in some direction, it's pretty much too late and increasing the render window size won't help because we're already limited by the render throughput at that point. Reviewed By: ericvicenti Differential Revision: D3250916 fbshipit-source-id: 930d418522a3bf3e20083e60f6eb6f891497a2b8