Nightly spends tons of time (14s) around MinorGC on an online JSON-to-HTML converter (followup from bug 1864862)
Categories
(Core :: JavaScript Engine, task, P3)
Tracking
()
People
(Reporter: mayankleoboy1, Assigned: jonco)
References
(Blocks 2 open bugs)
Details
Attachments
(5 files)
This is same as bug 1864862, with a minor difference: You need to run the demo a second time immediately after the first run completes and the page is clickable.
STR:
- Go to https://www.textcompare.org/json/json-to-html/
- Paste the sample JSON into the input box
- Click on "Process" --> Be alert after this step
- Very Imp: As soon as the page is clickable again. click on "Process" again
AR: https://share.firefox.dev/3MCtJg6 , https://share.firefox.dev/3XfP0kL , https://share.firefox.dev/3AWbM9V
14s of time around MinorGC.
Maybe something to improve?
Reporter | ||
Comment 1•3 months ago
|
||
Reporter | ||
Comment 2•3 months ago
|
||
Reporter | ||
Comment 3•3 months ago
|
||
This is a regression.
Bisection:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=c715b86068059bd614e2bac57bba333b46b090e0&tochange=291d187ba249c56d5c9dc88b5faaf04db2afe9c1
Suspect: bug 1892242 . However, I set javascript.options.mem.nursery.max_kb = 16384 and I could still repro.
Updated•3 months ago
|
Assignee | ||
Updated•3 months ago
|
Assignee | ||
Comment 4•3 months ago
|
||
This adds an AutoSelectGCHeap in SplitHelper so that substrings are allocated
in the tenured heap if we trigger a minor GC.
Also this allocates the result array up front to avoid having to copy the
elements for large arrays.
Assignee | ||
Comment 5•3 months ago
|
||
The profile still shows some long minor GCs with the patch applied but it should help.
Reporter | ||
Comment 8•3 months ago
•
|
||
Profile with the latest Nightly:
- Run the demo thrice: https://share.firefox.dev/47oCUuk
- Continue with the run#1, manually trigger "free memory", then run the demo thrice: https://share.firefox.dev/4d0h41v
Profile looks good. (Browser is maybe maybe retaining memory that is not released even after manually doing "free memory". But this may be an existing behaviour. The browser behaviour is quite variable. Sometimes it retains 1.8GB memory, sometimes it can retain upto 3.8GB)
Reporter | ||
Comment 9•3 months ago
|
||
run the demo 3 times, then wait, then manually trigger "free memory"
Reporter | ||
Comment 10•3 months ago
|
||
Continue with the previous demo run (i.e. tab is not closed)
Run the demo thrice, wait, manually trigger "free memory", dump the memory report.
Reporter | ||
Comment 11•3 months ago
|
||
Sorry, I didnt mean to derail this bug with vague/potentially pre-existing memory bugs.
Please feel free to ignore all of that. I am happy with the fix to the minorGC issue.
Assignee | ||
Comment 12•2 months ago
|
||
I've forked bug 1920477 for followup investigation of remaining issues and will close this one.
Updated•2 months ago
|
Description
•