From 9361168b992377275c93f6a5c2e3044facc955c4 Mon Sep 17 00:00:00 2001 From: Sergio Barrio Date: Mon, 29 Sep 2025 11:52:01 +0200 Subject: [PATCH] Set benchmark to be built using new architecture by default --- benchmarks/README.md | 8 +++++--- benchmarks/android/gradle.properties | 2 +- benchmarks/scripts/build-ios-benchmark.sh | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/benchmarks/README.md b/benchmarks/README.md index b8893e34a..81cb8c66d 100644 --- a/benchmarks/README.md +++ b/benchmarks/README.md @@ -6,17 +6,19 @@ 2. From the iOS folder, run `pod install`. 3. From the root folder, run `yarn ios` or `yarn android`. -## Enable new architecture +## Enable old architecture + +The Benchmark app uses React Native's New Architecture by default. However, you may need to switch to the Old Architecture to compare performance between the two systems or reproduce bugs that are specific to legacy environments. ### iOS ``` -RCT_NEW_ARCH_ENABLED=1 pod install +RCT_NEW_ARCH_ENABLED=0 pod install ``` ### Android -Set `newArchEnabled=true` in `benchmarks/android/gradle.properties`. +Set `newArchEnabled=false` in `benchmarks/android/gradle.properties`. ## ENV config diff --git a/benchmarks/android/gradle.properties b/benchmarks/android/gradle.properties index 9fb15664b..5e24e3aa8 100644 --- a/benchmarks/android/gradle.properties +++ b/benchmarks/android/gradle.properties @@ -32,7 +32,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 # your application. You should enable this flag either if you want # to write custom TurboModules/Fabric components OR use libraries that # are providing them. -newArchEnabled=false +newArchEnabled=true # Use this property to enable or disable the Hermes JS engine. # If set to false, you will be using JSC instead. diff --git a/benchmarks/scripts/build-ios-benchmark.sh b/benchmarks/scripts/build-ios-benchmark.sh index e5f811a79..b9eb8bb68 100755 --- a/benchmarks/scripts/build-ios-benchmark.sh +++ b/benchmarks/scripts/build-ios-benchmark.sh @@ -37,7 +37,7 @@ function build_ios_app { echo export NODE_BINARY=$(command -v node) > ${ROOT}/ios/.xcode.env rm Podfile.lock || true - pod install --repo-update + RCT_NEW_ARCH_ENABLED=1 pod install --repo-update # Build & Archive LOG_PATH="${XCODEBUILD_LOG_PATH:-logs/xcodebuild_full_output_benchmark_runner.log}"