Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

解析一个5M的文件,浏览器就崩溃了 (When parsing a 5M file, the browser crashes [?]) #26

Open
dengnanhao opened this issue Apr 3, 2024 · 3 comments

Comments

@dengnanhao
Copy link

微信截图_20240403154232

@a2800276
Copy link
Owner

a2800276 commented Apr 3, 2024

Thanks for the report, but I'm afraid I don't speak mandarin.

I've amended the title to the google translate translation: "When parsing a 5M file, the browser crashes",
but would require more information:

  • which browser, OS, and how much RAM on the system.
  • the error message encountered
  • a test case to reproduce the behavior
  • ideally, a suggestion of how out-of-memory situations should be handled.

Below is an automated translation of my response:

谢谢你的报告,但恐怕我不会说普通话。

我把标题修改为google翻译的翻译:“解析5M文件时,浏览器崩溃”,
但需要更多信息:

  • 哪种浏览器、操作系统以及系统上有多少 RAM。
  • 遇到的错误消息
  • 重现行为的测试用例
  • 理想情况下,建议如何处理内存不足的情况。

@a2800276 a2800276 changed the title 解析一个5M的文件,浏览器就崩溃了 解析一个5M的文件,浏览器就崩溃了 (When parsing a 5M file, the browser crashes [?]) Apr 3, 2024
@rom-p
Copy link
Contributor

rom-p commented Apr 8, 2024

I wrote this page and I will attempt to help.

What I see is that the browser didn't crash. It hit an internal JavaScript processing timeout, stopped, and displayed the error.

I tried to reproduce it on all the browsers I have using 5-10 MB files, and they all worked fine.

While it may be possible to change the page to process the file in parts, it would be a major effort. However, it may be possible to avoid the problem by using a different browser, or changing the JavaScript timeout -- something that some browsers allow to do.

@dengnanhao, please try this and please provide us the data on your system, as @a2800276 suggested above.

我写了这个页面,我会回应。
您的浏览器没有崩溃。它遇到了处理页面的内部时间限制。然后它停止了处理并告诉了您。
我尝试了许多5到10MB的文件,使用了我所有的浏览器。它们都运行良好。
虽然可以通过修改页面来分部分处理文件,但这将是一项重大工作。
但是,不同的浏览器有不同的超时时间。一些浏览器允许您更改JavaScript超时值。
@dengnanhao, 请尝试此操作,并按照@a2800276上面的建议,请提供您系统上的数据。

@dengnanhao
Copy link
Author

dengnanhao commented Apr 9, 2024

Thank you very much for your reply. @rom-p @a2800276 The actual file size is close to 50MB. This is due to my calculation error and caused inconvenience to everyone. I am very sorry.
Dingtalk_20240409091859

My testing environment:

  1. Edge browser, version 123.0.242081 (official version) (64 bit)
  2. Windows 11 operating system
  3. Machine memory 24G

You are correct. In actual testing, files with a size of 5-10M can be parsed @rom-p . The first time I tested the file, the actual size was over 49M, close to 50M. During parsing, I timed out and waited for three consecutive times, causing the browser to crash.
Expect hexy.js to be like [hexed]( https://hexed.it/ )The provided functions are the same, capable of parsing large files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants