Open Bug 1853495 Opened 3 years ago Updated 2 years ago

Online JS AST viewer spends 4min+ around GC. Chrome will crash.

Categories

(Core :: JavaScript Engine, task, P3)

task

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.

Attached file d3.txt —

Sample JS text

For a more reasonable JS code, here are the profiles:

Nightly: https://share.firefox.dev/3ZmROgL
Chrome: https://share.firefox.dev/3LrMoLp

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.

GC scheduling in web workers leaves a lot to be desired, and it looks like this is causing us problems in the first profile.

See Also: → 1678230

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.

Severity: -- → N/A
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: