-
Hi, thanks for creating this space! ❤️ I'm currently running some performance benchmarks comparing old arch and new arch and the results I'm getting are surprising to me. I'm using
Scenario 1: comparing rendering 10k viewsWINNER New arch ✅ The winner is clearly the new arch here and by far. Kudos on that! 🤩 2022-10-18.13-19-38.mp4I'm also running some perf metrics comparison using our own tool (https://github.com/bamlab/android-performance-profiler) that's basically a glorified The full report here makes it clear that this is because the new renderer is much more efficient than the old bridge Scenario 2: comparing rendering 2k textsWINNER Old arch ❌ 2022-10-19.14-22-08.mp4This time the old arch is faster, mainly because of heavier UI thread consumption All the code is here. This might have a big impact on performance of apps migration:
I haven't tried to go deeper with a system trace to check what was going on yet, and my understanding of how the new arch works and implements layouting is limited still. But I'm hoping to get a discussion started towards improving performance (and/or the benchmarks) and what could be done, if someone already has some ideas |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 9 replies
-
Same here, I tested the |
Beta Was this translation helpful? Give feedback.
-
Hello Almouro, First of all, thank you very much for sharing your benchmarks, as well as a playground where we could look into and understand what is happening. I’ve personally tried to reproduce your results on both a Pixel 5 and a Pixel 3 physical device. I ran many-texts and 100-tweets scenarios. On both devices the CPU performances were about neutral. We’re aware of the higher memory consumption. The new architecture has complete in memory representation of UI. This adds the extra memory cost but it unlocks new features like concurrent rendering. We’re looking into ways to optimise memory usage. To better understand what would be the culprit here, I’d like to ask follow up questions:
I’d like to take the opportunity to say that the React Native team is fully committed to rollout the New Architecture of React Native, without introducing regressions for our users. I’m personally interested in taking a closer look at any well-reported regression. To give you a bit of context, performance was a big concern during the rollout of the New Architecture in our internal products. Our internal performance evaluation was neutral across all React Native surfaces in the Facebook app on both Android and iOS. In the last years, we conducted dozens of tests in production on millions of devices to assure performance was neutral. Still, we’re open to looking into benchmarks like the one you reported to understand if there are regression we might have missed. Sam on behalf of the React Team. |
Beta Was this translation helpful? Give feedback.
-
Hello @Almouro, we spent some time analysing performance and summarised our findings in #123. If you have some time, could you please try to run your benchmarks on the 0.72.0-RC.1 and see what the performance is like? We've made some improvements. |
Beta Was this translation helpful? Give feedback.
-
any article discussing the RN 0.76 performance ? |
Beta Was this translation helpful? Give feedback.
Hello Almouro,
First of all, thank you very much for sharing your benchmarks, as well as a playground where we could look into and understand what is happening.
I’ve personally tried to reproduce your results on both a Pixel 5 and a Pixel 3 physical device. I ran many-texts and 100-tweets scenarios. On both devices the CPU performances were about neutral. We’re aware of the higher memory consumption. The new architecture has complete in memory representation of UI. This adds the extra memory cost but it unlocks new features like concurrent rendering. We’re looking into ways to optimise memory usage.
To better understand what would be the culprit here, I’d like to ask follow up questions: