From 60a452b4853dc5651c465867344904dd6fc86703 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Tue, 30 May 2023 11:44:26 +0100 Subject: [PATCH] [LOCAL] Fix performance issues in Hermes when Debug --- packages/react-native/ReactAndroid/hermes-engine/build.gradle | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/react-native/ReactAndroid/hermes-engine/build.gradle b/packages/react-native/ReactAndroid/hermes-engine/build.gradle index f241e1d36500d9..5cbda56825a15e 100644 --- a/packages/react-native/ReactAndroid/hermes-engine/build.gradle +++ b/packages/react-native/ReactAndroid/hermes-engine/build.gradle @@ -181,6 +181,8 @@ android { // This has the (unlucky) side effect of letting AGP call the build // tasks `configureCMakeRelease` while is actually building the debug flavor. arguments "-DCMAKE_BUILD_TYPE=Release" + // Adding -O3 to patch the issue here: https://github.com/android/ndk/issues/1740#issuecomment-1198438260 + cppFlags "-O3" } } }