Open Bug 1881922 Opened 11 months ago Updated 3 months ago

Page slows down Firefox but not Chrome while scrolling down the page

Categories

(Web Compatibility :: Site Reports, defect, P2)

Tracking

(firefox130 fixed)

REOPENED
Tracking Status
firefox130 --- fixed

People

(Reporter: kernp25, Assigned: twisniewski)

References

(Depends on 1 open bug, )

Details

(Keywords: webcompat:sitepatch-applied)

User Story

platform:windows,mac,linux,android
impact:site-broken
configuration:general
affects:all
diagnosis-team:dom

Attachments

(5 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0

Steps to reproduce:

  1. Go to https://helpdeskgeek.com/windows-11/how-to-customize-the-right-click-context-menu-in-windows-11/
  2. Scroll down the page

Actual results:

Firefox starts lagging.

Attached image firefox_sSgaYqWbaW.png

Uncaught InternalError: too much recursion

It will show this error in the developer console: Uncaught InternalError: too much recursion

Maybe you know why this happens?

Flags: needinfo?(emilio)

If I start scrolling down the page, the error "Uncaught InternalError: too much recursion" will spam the console.

The Bugbug bot thinks this bug should belong to the 'Core::Panning and Zooming' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Panning and Zooming
Product: Firefox → Core

Can repro. Looks to be some infinite recursion in jquery.
Repros on a build from Jan2023. I would say this may be a tech evangelism or web-compat bug.

Status: UNCONFIRMED → NEW
Component: Panning and Zooming → Desktop
Ever confirmed: true
Product: Core → Web Compatibility
Version: Firefox 123 → Trunk

Here's a profile: https://share.firefox.dev/3wnRKTi

It seems the page recurses infinitely on a DOMSubtreeModified event handler, adding and removing the fixed class to a sidebar...

Flags: needinfo?(emilio)
Severity: -- → S2
Priority: -- → P2
Depends on: 1901778
User Story: (updated)
Duplicate of this bug: 1888525
Assignee: nobody → twisniewski
Status: NEW → ASSIGNED
Pushed by twisniewski@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ab3efb665f17 disable legacy DOM Mutation Events on helpdeskgeek.com to fix performance issues; r=ksenia,webcompat-reviewers
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED

Re-opening, as this is site-patched, not actually fixed.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
User Story: (updated)
Attached file testcase.html

I (actually chatgpt) generated a test file for this which keeps adding and removing the same class in a handler for DOMSubtreeModified.

In Firefox, you'll notice lots of DOMSubtreeModified callbacks are run, but only like 3 in Chrome. Intuitively, Firefox does it right, perhaps Chrome has some optimization to prevent it from running too much?

Chrome's Mutation Events are rather broken.
Luckily the plan is to get rid of them once the reverse origin trial on Chrome ends.
https://github.com/whatwg/dom/issues/305#issuecomment-2307398121

We have a pref ready to disable mutation events: dom.mutation_events.enabled

Yeah, given the site relies on deprecated mutation event, and I think we are doing the correct thing here.

I am going to call this a site-bug as it's likely a bug in their code. It's just Chrome somehow avoided this...

I also think the priority/severity can be decreased given this is deprecated mutation event.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: