Online JS AST viewer spends 4min+ around GC. Chrome will crash.
Categories
(Core :: JavaScript Engine, task, P3)
Tracking
()
People
(Reporter: mayankleoboy1, Unassigned)
References
(Blocks 1 open bug, )
Details
Attachments
(2 files)
Go to https://prettier.io/playground/
In the left pane where the options are, scroll to the bottom.
Un-Select "Show AST" (if it is selected)
Copy and paste the sample JS text.
Select "Show AST"
Nightly : https://share.firefox.dev/48gYd0K (240 seconds and still running)
Chrome: Crashes after a few seconds
We dont crash, so I guess we are technically better than Chrome. But I am filing this bug in case there is some room for improvement.
| Reporter | ||
Comment 1•3 years ago
|
||
Sample JS text
| Reporter | ||
Comment 2•3 years ago
|
||
For a more reasonable JS code, here are the profiles:
Nightly: https://share.firefox.dev/3ZmROgL
Chrome: https://share.firefox.dev/3LrMoLp
| Reporter | ||
Comment 3•3 years ago
|
||
| Reporter | ||
Comment 4•3 years ago
|
||
I tested on a Nightly from Jan2021. That build had continuous memory increase and reached 7GB+ before I quit the browser.
So our behaviour has improved from before in the sense that we will not OOM and crash.
Comment 5•3 years ago
|
||
GC scheduling in web workers leaves a lot to be desired, and it looks like this is causing us problems in the first profile.
| Reporter | ||
Comment 6•3 years ago
•
|
||
I tried disabling service workers by setting dom.serviceWorkers.enabled=False in a new profile and then visitng the test page. But even then the JS execution was run in a DOM worker per profiler.
So if there is a way to disable SWs and force the page to run JS on the main thread, I would be happy to do that and post results here.
Updated•3 years ago
|
| Reporter | ||
Comment 7•2 years ago
•
|
||
Profile with latest Nightly: https://share.firefox.dev/3THbKbo / https://share.firefox.dev/3IYM8lx
Description
•