javascript - TextDecoder iso-8859-1:Fatal javascript OOM in In Effective mark-compacts near heap limit
问题描述
我正在处理非常大的 CSV 文件(85Mo)。用 打开文件后Deno.readFile
,我用 解码它new TextDecoder("iso-8859-1").decode(rawData);
并得到以下错误:
注意:我没有使用 utf-8 得到这个错误
<--- Last few GCs --->
[17822:0x5400000000] 27318 ms: Mark-sweep (reduce) 1399.4 (1401.5) -> 1399.3 (1403.2) MB, 3173.1 / 0.0 ms (+ 0.1 ms in 431 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 3424 ms) (average mu = 0.191, current mu = 0.[17822:0x5400000000] 30483 ms: Mark-sweep (reduce) 1399.8 (1401.7) -> 1399.5 (1402.5) MB, 3164.5 / 0.0 ms (average mu = 0.100, current mu = 0.000) allocation failure scavenge might not succeed
<--- JS stacktrace --->
#
# Fatal javascript OOM in Ineffective mark-compacts near heap limit
#
[1] 17822 illegal hardware instruction
Deno 版本:1.2.2
Mac 操作系统:10.14.6
内存:16 Gb
问题
使用编码解码文件时我做错了什么iso-8859-1
?
解决方案
这似乎是一个错误。
似乎是https://github.com/denoland/deno/blob/master/op_crates/web/08_text_encoding.js中 TextDecoder 实现中的一个错误
使用以下 v8 标志暂时绕过问题运行 deno:
--v8-flags=--max-old-space-size=8192
推荐阅读
- python - Postgres ON CONFLICT DO NOTHING 查询
- python - 变量只存储一个值,python
- c++ - 使用外部 txt 文件验证密码不起作用
- html - 锚元素有效,但 Blazor 客户端中的按钮无效
- c# - Unity 无法访问 prefab 的脚本变量
- google-sheets - 我有一个客户列表,每个客户都有发票日期,我试图平均客户订单之间的日期
- xero-api - 创建新发票
- ruby - 所有 Ruby 命令立即关闭
- python - PyOMO:具有二进制域的变量正在优化为浮点值 b/w 0 和 1
- python - 我可以将 python 字典值拆分为单独的数据帧,其数据帧名称等于它包含的值的键名吗?