【发布时间】:2017-11-15 23:13:54
【问题描述】:
AFAIK V8 有一个已知的hard limit on the length of allowed Strings。尝试解析 >500MB 的字符串会弹出错误:
Invalid String Length
使用 V8 标志来增加堆大小没有任何区别
$ node --max_old_space_size=5000 process-large-string.js
我知道我应该改用 Streams。但是有什么方法可以增加String 的最大允许长度吗?
更新:下面@PaulIrish 的回答表明他们将其提高到 1GB - 但它仍然不是用户可配置的
【问题讨论】: