Firefox janks for ~1.5-2x as long as Chrome in click handler, when unchecking a topic at https://twitter.com/settings/your_twitter_data/twitter_interests
Categories
(Core :: JavaScript Engine, task, P3)
Tracking
()
Performance Impact | medium |
People
(Reporter: dholbert, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: perf:responsiveness, Whiteboard: [sp3])
STR:
- Log in to a twitter account
- Visit https://twitter.com/settings/your_twitter_data/twitter_interests
(Note: for me, this^ page has ~hundreds of entries; not sure how many are required to trigger the perf issue here, but I suspect you need lots.) - Start profiling.
- Click one of the interest topics to un-check its checkbox.
- Stop profiling.
ACTUAL RESULTS:
This is noticeably less responsive in Firefox as compared to Chrome. My profile bears that out, too; the click action takes ~1.5-2x as long in Firefox vs. Chrome.
Firefox profile, with 2 clicks (where the click handler takes 421ms and 336ms, respectively):
https://share.firefox.dev/3FE00zg
If I perform the same operation in Chrome, the click handler duration is between 190ms to 240ms.
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Comment 1•2 years ago
|
||
Here's another profile, with 5 clicks (unchecking 5 topics). 4/5 are in the 360-390ms range, and one (the second one) is a little faster at 335ms.
(Still about 1.5x of the durations that I observed from Chrome in its profiler, anyway.)
Reporter | ||
Comment 2•2 years ago
|
||
link for the profile described in comment 1: https://share.firefox.dev/3FDRgco
Updated•2 years ago
|
Comment 3•2 years ago
|
||
I think this is another one under the React bucket; not sure if you want to take a look Iain.
(Myself, I can't reproduce, but my machine is very fast)
Reporter | ||
Comment 4•2 years ago
•
|
||
(In reply to Matthew Gaudet (he/him) [:mgaudet] from comment #3)
(Myself, I can't reproduce, but my machine is very fast)
FWIW I reported this from a pretty fast machine as well; it's my main development machine, which is a ThinkPad P15 Gen 1, purchased about a year ago.
(In reply to Daniel Holbert [:dholbert] from comment #0)
STR:
- Log in to a twitter account
- Visit https://twitter.com/settings/your_twitter_data/twitter_interests
(Note: for me, this^ page has ~hundreds of entries; not sure how many are required to trigger the perf issue here, but I suspect you need lots.)
To fill in the "how many entries" detail here, since that's probably relevant for how-expensive-this-operation-is: it looks like I currently have 654 "interests" listed here. I got that number by inspecting one of my interests in devtools, and then selecting its parent (an unstyled <div>
), and then evaluating $0.childElementCount
in my web console.
Comment 5•2 years ago
|
||
Interesting; I have the exact same count as you (algorithm limit perhaps?)
On my machine (M1 Max MBP), I'm only seeing 190ms jank when clicking in my profile
Comment 6•2 years ago
|
||
It looks like the vast majority of time (in both profiles) is in code from https://abs.twimg.com/responsive-web/client-web/vendors~main.b550e1d6.js, and in particular line 85, which is react-dom-production.min.js
.
So yeah, this goes in the React bucket.
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Description
•