Open Bug 1952616 Opened 9 days ago Updated 9 days ago

Testcase generating N MutationObserver() is 2x slower for N=5000000. We also take 3 mimutes to call disconnect() on N=500000. 60% of memory is heap-unclassified.

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement

Tracking

()

People

(Reporter: mayankleoboy1, Unassigned)

References

Details

Attachments

(2 files)

Attached file MutationObserver.HTML

On a fresh Firefox profile.

N=5000000

Generate

Start observing:

N=500000

Firefox to delete: https://share.firefox.dev/3FdNMkC (190s)
Chrome: Not possible to test.

Testcase generated by chatpgpt based on my prompt. Very unrealistic but maybe these highlight some hotspots?
Feel free to WONTFIX.

Summary: Testcase generating N MutationObserver() is 2x slower for N=5000000. We also take 3 mimutes to call disconnect() on N=500000 → Testcase generating N MutationObserver() is 2x slower for N=5000000. We also take 3 mimutes to call disconnect() on N=500000. 60% of memory is heap-unclassified.
Attached file memory-report.json.gz

file (pid 9440)

Explicit Allocations

2,099,438,480 B (100.0%) -- explicit
├──1,283,052,488 B (61.11%) ── heap-unclassified
├────529,828,160 B (25.24%) -- window-objects/top(file:///C:/Users/mayan/OneDrive/Desktop/New%20folder%20(2)/testcases%20by%20chatgpt/Round8/MutationObserver.HTML, id=5)
│ ├──522,434,872 B (24.88%) -- active/window(file:///C:/Users/mayan/OneDrive/Desktop/New%20folder%20(2)/testcases%20by%20chatgpt/Round8/MutationObserver.HTML)
│ │ ├──522,255,816 B (24.88%) -- js-realm(file:///C:/Users/mayan/OneDrive/Desktop/New%20folder%20(2)/testcases%20by%20chatgpt/Round8/MutationObserver.HTML)
│ │ │ ├──522,252,008 B (24.88%) -- classes
│ │ │ │ ├──280,262,680 B (13.35%) -- class(Function)/objects
│ │ │ │ │ ├──280,256,936 B (13.35%) ── gc-heap
│ │ │ │ │ └────────5,744 B (00.00%) ── gc-buffers/slots
│ │ │ │ ├──200,000,000 B (09.53%) ── class(MutationObserver)/objects/gc-heap
│ │ │ │ ├───41,943,592 B (02.00%) -- class(Array)/objects
│ │ │ │ │ ├──41,943,480 B (02.00%) -- gc-buffers
│ │ │ │ │ │ ├──41,942,976 B (02.00%) ── elements/normal
│ │ │ │ │ │ └─────────504 B (00.00%) ── slots
│ │ │ │ │ └─────────112 B (00.00%) ── gc-heap
│ │ │ │ ├───────29,336 B (00.00%) -- class(<non-notable classes>)/objects
│ │ │ │ │ ├──22,688 B (00.00%) ── gc-buffers/slots

So three issues:

  1. 2x slower to generate
  2. 190 seconds to call disconnect()
  3. 50% of the memory after generation is in heap-unclassified
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: