From b53d671fcf80898df7f6c2e519f23ee6ea138e84 Mon Sep 17 00:00:00 2001 From: Aakash Patel Date: Fri, 7 Apr 2023 12:55:36 -0700 Subject: [PATCH] Increase default max stack size (#923) (#923) Summary: Original Author: 4092035+mikeduminy@users.noreply.github.com Original Git: 1b759f40bd2f6bb72b2a353f0d9856fcbdbb981c As discussed in https://github.com/facebook/hermes/issues/135, the default stack size doesn't work for all use cases. In particular, when very large and complex bundles are loaded in dev mode. This PR bumps the default stack size from `64*1024` (512kB) to `128*1024` (1MB). As suggested by tmikov in this comment - https://github.com/facebook/hermes/issues/135#issuecomment-1444984528. Pull Request resolved: https://github.com/facebook/hermes/pull/923 Original Reviewed By: tmikov Original Revision: D43630032 Reviewed By: tmikov Differential Revision: D44770995 fbshipit-source-id: 400221033e4c1e079535342331c99561f141b830 --- public/hermes/Public/RuntimeConfig.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/hermes/Public/RuntimeConfig.h b/public/hermes/Public/RuntimeConfig.h index a61a37d7f12..7c2e0177923 100644 --- a/public/hermes/Public/RuntimeConfig.h +++ b/public/hermes/Public/RuntimeConfig.h @@ -35,7 +35,7 @@ class PinnedHermesValue; F(constexpr, PinnedHermesValue *, RegisterStack, nullptr) \ \ /* Register Stack Size */ \ - F(constexpr, unsigned, MaxNumRegisters, 64 * 1024) \ + F(constexpr, unsigned, MaxNumRegisters, 128 * 1024) \ \ /* Whether to allow eval and Function ctor */ \ F(constexpr, bool, EnableEval, true) \