From 8f8ebaef9a6e6310ec1934a1dae9a30436b344fb Mon Sep 17 00:00:00 2001 From: sudoplz Date: Wed, 4 Mar 2026 23:15:18 +0200 Subject: [PATCH] Revert "Avoid GC during the app start" This reverts commit 491af549a15aaf295af3eca4da6b69d6eecf8edc. --- .../ReactCommon/react/runtime/hermes/HermesInstance.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/react-native/ReactCommon/react/runtime/hermes/HermesInstance.cpp b/packages/react-native/ReactCommon/react/runtime/hermes/HermesInstance.cpp index d6cd5471d77..f5c376c0e19 100644 --- a/packages/react-native/ReactCommon/react/runtime/hermes/HermesInstance.cpp +++ b/packages/react-native/ReactCommon/react/runtime/hermes/HermesInstance.cpp @@ -131,12 +131,10 @@ std::unique_ptr HermesInstance::createJSRuntime( auto gcConfig = ::hermes::vm::GCConfig::Builder() // Default to 3GB - .withInitHeapSize(150ll * 1024 * 1024) - .withShouldReleaseUnused(::hermes::vm::kReleaseUnusedNone) .withMaxHeapSize(3072 << 20) .withName("RNBridgeless"); - if (true || allocInOldGenBeforeTTI) { + if (allocInOldGenBeforeTTI) { // For the next two arguments: avoid GC before TTI // by initializing the runtime to allocate directly // in the old generation, but revert to normal