Closed Bug 1943648 Opened 22 days ago Closed 8 days ago

Testcase (with many XML files) spends 12s in parent-process and content-process on reloading in the background. Chrome reloads it instantly (slow blob URL unregisteration?)

Categories

(Core :: DOM: File, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
137 Branch
Tracking Status
firefox137 --- fixed

People

(Reporter: mayankleoboy1, Assigned: baku)

References

Details

Attachments

(2 files)

Attached file XML.HTML

Open the attached testcase
Enter 50000 and press generate
Start the profiler and reload the page.

Nightly: https://share.firefox.dev/3Wy5Xrf (12s on parent-process + 12s on content-process)
Chrome: https://share.firefox.dev/42qK9RQ (instant)
Profile with all threads+ IO + IPC: https://share.firefox.dev/40O0vSd
Firefox to generate the xmls: https://share.firefox.dev/3CzEoGW
No idea how real worlds this testcase is. I thought of the testcase and asked chatpgpt to write the HTML. Feel free to INVALID/WONTFIX this bug.

Component: Performance → DOM: Streams

Profile with 100000 xml : https://share.firefox.dev/4hMwWrh

Summary: Testcase spends 12s in parent-process and content-process on reloading in the background. Chrome reloads it instantly → Testcase spends 12s in parent-process and content-process on reloading in the background. Chrome reloads it instantly (slow blob URL unregisteration?)

Not sure why this is streams? I only see some blobs and layouts.

Back to performance for proper eyes.

Component: DOM: Streams → Performance
See Also: → 1943230
Summary: Testcase spends 12s in parent-process and content-process on reloading in the background. Chrome reloads it instantly (slow blob URL unregisteration?) → Testcase (with many XML files) spends 12s in parent-process and content-process on reloading in the background. Chrome reloads it instantly (slow blob URL unregisteration?)
Performance Impact: --- → ?

I believe DOM: File is the appropriate component.

Removing performance impact flag as this is a testcase and not and end-user reported issue.

Andrea might have ideas here.

Performance Impact: ? → ---
Component: Performance → DOM: File
Flags: needinfo?(amarchesini)
Assignee: nobody → amarchesini
Flags: needinfo?(amarchesini)

Profile of generating 50k XML's with all threads + All IO + IPC: https://share.firefox.dev/4gtFJgv

The testcase is very unrealistic, but at least we can fix some of it easily.

yeah, that has been my driver for creating these testcase - to see if there is anything that is obviously bad/quadratic/easily fixable.

Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a6927badc97c Reduce the number of IPC calls when unregistering blobURLs, r=smaug
Flags: needinfo?(amarchesini)
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d6017f3c8ff9 Reduce the number of IPC calls when unregistering blobURLs, r=smaug
Duplicate of this bug: 1407620
Status: NEW → RESOLVED
Closed: 8 days ago
Resolution: --- → FIXED
Target Milestone: --- → 137 Branch

This is what i get with 50K XMLs on nightly: https://share.firefox.dev/417JjbG
So, much improved.

Looks like there are still some easy wins. ContentParent::mBlobURLs has rather slow data structure for this.
And ContentParent::ValidatePrincipal is taking lots of time. Both in the parent process. The first one might be easy to fix, the latter would need some thinking.

Regressions: 1947303
No longer regressions: 1947303
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: