We implemented the same UI on Android and iOS with the use of Native, React Native, and Flutter. We also automated scroll velocity with the use of RecyclerView.SmoothScroller on Android. On iOS and React Native we used an approach with timer and programmatically scrolling to position. On Flutter, we used ScrollController to smoothly scroll over the list. In each case, we had 1000 items in the list view and the same scrolling time to reach the last list element. In each of these cases, we used image caching with different libs per platform. More details could be revealed in the source code.
iOS
Android
React Native
Android — GPU tests results are not supported by the benchmark (unfortunately, with the devices we have, and we have many:)) )
Test results
Test results
Nowadays most phones running on Android and iOS have powerful hardware. In most cases using usual business apps, no fps drops could be noticed. That’s why we decided to do some tests with heavy animations. Heavy enough to get fps drops. We used vector animations animated with Lottie on Android, iOS, React Native and adopted the same animations to use with Flare on Flutter.
Testing animation with Lottie for Android, iOS, React Native, and Flare for Flutter.
Lottie for Android
Test results
Test results
Android
Android and React Native have similarities in their performance. It’s obvious because Lottie for React Native uses Native means (16–19% CPU, 30–29 FPS).
Flutter’s outcome is such a surprise, though it screwed up a bit during a performance. (12% CPU and 9 FPS).
We discovered that removing one specific animation from the grid increases FPS up to 40% on Flutter. We suppose Flare is heavier and not optimized for this kind of task that’s why Flutter got such an FPS drop.
3. Android requires the least amount of memory (205 Mb); React Native needs 280 Mb and Flutter requires 266 Mb.
4. Cold app start. According to this indicator, Flutter is the leader (2 seconds). For Android Native and React Native, it takes around 4 seconds.
iOS
_Take note: _we used a different library for this case with Flutter which is much heavier compared to those we used for other platforms and it might be the reason for fps drops.
#flutter #react native