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

Page overload if you paste too much text in the regex box #2347

Open
Palloxin opened this issue Sep 18, 2024 · 4 comments
Open

Page overload if you paste too much text in the regex box #2347

Palloxin opened this issue Sep 18, 2024 · 4 comments

Comments

@Palloxin
Copy link

Palloxin commented Sep 18, 2024

Bug Description

Page and browser (and OS) overload if you paste too much text in the regex box

Reproduction steps

largetext.txt
Paste the content of this file in the regex box.

Expected Outcome

Probably a character limit in the regex box, for stability reasons
Edit: character limit check when text gets pasted

Other details

In the file there are 9.3 milion characters. I somehow pasted by mistake way more than that like 100 and the OS started lagging badly too.
I suggest to put a 100k character limit to the regex box or something to prevent the browser to collapse.
I am not sure if putting a character check limit would make the match time slower; if so please find another solution.

Browser

Firefox

OS

Windows 10

@Palloxin Palloxin added the bug label Sep 18, 2024
@Palloxin
Copy link
Author

Palloxin commented Sep 18, 2024

Maybe a character-limit-check ONLY upon the action of "pasting" text.

@working-name
Copy link
Collaborator

When you say regex box do you mean the regular expression input or test string textarea?

@Palloxin
Copy link
Author

Palloxin commented Sep 18, 2024

regular expression box.

The string box can take a lot of text, no problem.

@working-name
Copy link
Collaborator

I see. I pasted the text you linked in Brave and it chewed up 8GB of RAM, was responsive for a couple seconds, then the tab crashed: Error code: Out of Memory but the OS is fine. I'm assuming it has to do with the fact that I have plenty of system memory.

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

No branches or pull requests

2 participants