Closed mindplay-dk closed 2 years ago
What browser are you using?
Just upgraded from Chrome 99 to Chrome 100, so:
Version 99.0.4844.84 (Official Build) (64-bit)
Version 100.0.4896.75 (Official Build) (64-bit)
Upgrading to Chrome 100 seems to reveal a bit more detail in the Performance report:
It looks like it's hung up on a RegExp
?
Tested in recent versions of Firefox with similar results.
97.0.1 (64-bit)
98.0.2 (64-bit)
Also note, in Firefox, the "Output" panel comes up blank after trying to parse this. 🤔
For the record (as you might expect) same issue in Edge.
It's odd, I can't reproduce it in firefox or chrome:
chrome Version 99.0.4844.84 (Official Build) (64-bit):
EDIT: NEVERMIND I was pasting in the wrong field..... I indeed get the same thing
Yeah the issue is the regex for the StringLiteral. As far as i can tell, the +
nested inside the *
leads to an explosion of combinations if it isn't found.
Hold on...
Sorry, I don't know enough regex to say if the PR is right. 😅
@mindplay-dk Should be fixed now.
Confirmed, the issue is gone. Nice work! Thanks. 🙂
In the playground, open the default "JSON Grammar and CST output" example.
Then paste the following input:
⚠ Notice the deliberate omission of the closing quote after
children ages
.Lexer appears to get stuck for more than 6 seconds:
I don't know how that's even possible with an input this small - what could it possibly be doing for this long? 🙂