msn.com - Gallery slideshow is laggy
Categories
(Core :: JavaScript Engine: JIT, defect, P3)
Tracking
()
Performance Impact | medium |
People
(Reporter: ctanase, Unassigned)
References
(Blocks 1 open bug, )
Details
(Keywords: perf, top100)
Attachments
(1 file)
3.00 MB,
video/mp4
|
Details |
Environment:
Operating system: Windows 10
Firefox version: Nightly 130.0a1 (2024-07-31)
Steps to reproduce:
- Go to https://www.msn.com/en-xl/lifestyle/other/ranked-the-25-richest-royals-in-the-world-today/ss-BB1qTT6Y?ocid=hpmsn&cvid=53508a19a407427a864e80d2f23a795a&ei=27#image=1
- Click the next button in the image gallery a couple of times.
Expected Behavior:
The gallery slideshow works smoothly.
Actual Behavior:
The gallery slideshow gets laggy.
Notes:
- Screen rec attached
- Reproducible regardless of the ETP status
- Reproducible on Firefox Release as well
- Not reproducible on Chrome
- Performance Profile: https://share.firefox.dev/4cam0R1
- Issue found during WebCompat team [Top100] websites testing
Updated•2 months ago
|
Updated•2 months ago
|
Comment 1•1 month ago
|
||
This bug was moved into the Performance component.
:ctanase, could you make sure the following information is on this bug?
✅ For slowness or high CPU usage, capture a profile with http://profiler.firefox.com/, upload it and share the link here.- For memory usage issues, capture a memory dump from
about:memory
and attach it to this bug. - Troubleshooting information: Go to
about:support
, click "Copy raw data to clipboard", paste it into a file, save it, and attach the file here.
If the requested information is already in the bug, please confirm it is recent.
Thank you.
Reporter | ||
Updated•1 month ago
|
Comment 2•17 days ago
|
||
Can you still reproduce this? The profile shows an obvious problem but I cannot reproduce it locally and wonder if it was a temporary site-bug.
Reporter | ||
Comment 3•14 days ago
|
||
Yes, I can still reproduce the issue on Firefox Nightly 131.0a1 (2024-09-01).
Comment 4•14 days ago
|
||
This appears to be in a JITed function, hopefully someone on the JS team can manage to reproduce this issue.
The Performance Impact Calculator has determined this bug's performance impact to be medium. If you'd like to request re-triage, you can reset the Performance Impact flag to "?" or needinfo the triage sheriff.
Platforms: Windows
Impact on site: Causes noticeable jank
Websites affected: Major
Comment 5•13 days ago
•
|
||
I think we have multiple issues:
- We have many calls to
js::ArraySliceDense
, which is likely part of the memory usage. - The first one being that this function
Q
is something that we could probably optimize.- The function
Q
seems to be responsible for a large part of the allocations.
- The function
I guess this might be the Q
function in question:
function Q(t, e, n, i) {
if (i && t) {
var r = (0, u.Vv) (i.value, i.kind, i.propertyType);
if (r > - 1) {
var o = t[Z];
o ||
(o = t[Z] = {
f: {
}
});
var a = o[K];
if (a || (a = o[K] = {}), e) for (var s = 0; s < e.length; s++) {
var l = e[s];
a[l] ||
(a[l] = {
f: {
}
});
var d = a[l][K];
d ||
(d = a[l][K] = {}),
a = d
}
a = a[n] = {},
(0, c.kJ) (i.value) ? a.a = {
t: r
}
: a.t = r
}
}
}
This single function makes me think that they have re-implemented some shadow-DOM like interface.
Maybe we can have some ref-counted object for shadow-DOM like objects? Or have the GC hint on what would be interesting to treat as a single-holder node for a sea of held objects?
Comment 6•12 days ago
|
||
Jon, Iain, any idea what could be done?
Description
•