Page slows down Firefox but not Chrome while scrolling down the page
Categories
(Web Compatibility :: Site Reports, defect, P2)
Tracking
(firefox130 fixed)
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:
- Go to https://helpdeskgeek.com/windows-11/how-to-customize-the-right-click-context-menu-in-windows-11/
- Scroll down the page
Actual results:
Firefox starts lagging.
It will show this error in the developer console: Uncaught InternalError: too much recursion
Maybe you know why this happens?
If I start scrolling down the page, the error "Uncaught InternalError: too much recursion" will spam the console.
Comment 4•11 months ago
|
||
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.
Comment 5•11 months ago
|
||
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.
Comment 6•11 months ago
|
||
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...
Comment 7•11 months ago
|
||
Comment 8•11 months ago
|
||
Updated•11 months ago
|
Updated•7 months ago
|
Updated•7 months ago
|
Assignee | ||
Comment 10•6 months ago
|
||
Updated•6 months ago
|
Comment 11•6 months ago
|
||
Comment 12•6 months ago
|
||
bugherder |
Assignee | ||
Comment 13•6 months ago
|
||
Re-opening, as this is site-patched, not actually fixed.
Updated•3 months ago
|
Comment 14•3 months ago
|
||
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?
Comment 15•3 months ago
|
||
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
Comment 16•3 months ago
|
||
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.
Description
•