Open Bug 1911035 Opened 2 months ago Updated 12 days ago

msn.com - Gallery slideshow is laggy

Categories

(Core :: JavaScript Engine: JIT, defect, P3)

Firefox 130
Desktop
Windows 10
defect

Tracking

()

Performance Impact medium

People

(Reporter: ctanase, Unassigned)

References

(Blocks 1 open bug, )

Details

(Keywords: perf, top100)

Attachments

(1 file)

Attached video msn FF vs Chrome.mp4

Environment:
Operating system: Windows 10
Firefox version: Nightly 130.0a1 (2024-07-31)

Steps to reproduce:

  1. 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
  2. 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:

  1. Screen rec attached
  2. Reproducible regardless of the ETP status
  3. Reproducible on Firefox Release as well
  4. Not reproducible on Chrome
  5. Performance Profile: https://share.firefox.dev/4cam0R1
  6. Issue found during WebCompat team [Top100] websites testing
Keywords: perf, top100
See Also: → 1911061
Component: Site Reports → Performance
Product: Web Compatibility → Core

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.

Flags: needinfo?(ctanase)
Flags: needinfo?(ctanase)

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.

Performance Impact: --- → pending-needinfo
Flags: needinfo?(ctanase)

Yes, I can still reproduce the issue on Firefox Nightly 131.0a1 (2024-09-01).

Flags: needinfo?(ctanase)

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

Performance Impact: pending-needinfo → medium
Component: Performance → JavaScript Engine: JIT

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.

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?

Jon, Iain, any idea what could be done?

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

Attachment

General

Creator:
Created:
Updated:
Size: