mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Set the max heap size for OSS apps on Android to be 1 GB for Hermes
Summary: The max heap size currently is 512 MB for OSS apps using Hermes on Android. Some users (see https://github.com/facebook/hermes/issues/295) are experiencing long pauses when reaching this ceiling. Increasing this limit to 1 GB should reduce the frequency of these pauses occurring for apps where the expected heap usage is near 512 MB. Changelog: [Internal] Set Hermes's default max heap size to 1 GB Reviewed By: mhorowitz Differential Revision: D22577343 fbshipit-source-id: 2d7d688e38e95a082692dca52d010d0449a6e64b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
63377fa66b
commit
63d20d3b1e
+1
-1
@@ -17,7 +17,7 @@ public class HermesExecutorFactory implements JavaScriptExecutorFactory {
|
||||
private final RuntimeConfig mConfig;
|
||||
|
||||
public HermesExecutorFactory() {
|
||||
this(null);
|
||||
this(new RuntimeConfig(1024));
|
||||
}
|
||||
|
||||
public HermesExecutorFactory(RuntimeConfig config) {
|
||||
|
||||
@@ -11,4 +11,10 @@ package com.facebook.hermes.reactexecutor;
|
||||
public final class RuntimeConfig {
|
||||
public long heapSizeMB;
|
||||
public boolean es6Proxy;
|
||||
|
||||
RuntimeConfig() {}
|
||||
|
||||
RuntimeConfig(long heapSizeMB) {
|
||||
this.heapSizeMB = heapSizeMB;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user