facebook / facebook/hermes

Increase MAX_STRING_LENGTH

Open
#1,031 5 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
11.3k
Forks
859
Avg merge
1h 30m
Merged PRs (30d)
3

Description

## Problem

I recently started seeing crashes in production after enabling hermes on my ios react native application when attempting to JSON.stringify a large payload. Our application deals with large amounts of data and we cannot easily control the size of the json payloads.

The reason this is happening is because hermes currently the MAX_STRING_LENGTH set to limited to 256mb which dramatically smaller than with JSC. With JSC (aka hermes off) I can safely stringify payloads up to 2GB before it causes an error.

## Solution

I would like to propose we increase the MAX_STRING_LENGTH to 1GB to at least match the limit for nodejs/v8.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.