HTML5 FileReader API crashes chrome 17 when reading large file as slice

喜夏-厌秋 提交于 2019-12-04 13:13:29

I had the same problem reading in a 1.8 GB file. If I watch task manager, chrome.exe would take up to 1.5 GB of memory and then crash. My solution was to use a Javascript worker and then use FileReaderSync instead of FileReader. The javascript worker runs in a separate thread, and FileReaderSync will only work in a javascript worker.

You need to change your algorithm that should change the chunk size run time according to the file size. the google chrome crashes when loop running continuously.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!