Closed Bug 1755290 Opened 4 years ago Closed 4 years ago

MaybeCreateDisplayPortInFirstScrollFrameEncountered spends a lot of wasted time in the tabbar in the parent process

Categories

(Core :: Panning and Zooming, defect)

defect

Tracking

()

RESOLVED FIXED
99 Branch
Tracking Status
firefox99 --- fixed

People

(Reporter: tnikkel, Assigned: tnikkel)

References

(Blocks 1 open bug)

Details

Attachments

(1 external file)

See https://bugzilla.mozilla.org/show_bug.cgi?id=1754052#c1 for STR.

The tabbar and nothing in it is WantAsyncScroll so the time is wasted.

A basic Firefox window has no element that WantAsyncScroll in the parent process, even if there are enough tabs to overflow the tabbar and make it scroll. This is because the underlying element is overflow hidden.

The tabbar is an arrowscrollbox

https://searchfox.org/mozilla-central/rev/e66593593f3b356901011ea0fcdf9979728e9ae8/browser/base/content/navigator-toolbox.inc.xhtml#56

Which is implemented here

https://searchfox.org/mozilla-central/rev/e66593593f3b356901011ea0fcdf9979728e9ae8/toolkit/content/widgets/arrowscrollbox.js#33

using a <scrollbox> element. These are meant to be programtically scrolled but not user scrolled, hence they are declared overflow hidden here

https://searchfox.org/mozilla-central/rev/e66593593f3b356901011ea0fcdf9979728e9ae8/toolkit/content/xul.css#540

and they have been that way since the early 2000s, so doesn' seem likely to change. overflow: hidden element do not WantAsyncScroll

https://searchfox.org/mozilla-central/rev/e66593593f3b356901011ea0fcdf9979728e9ae8/layout/generic/nsGfxScrollFrame.cpp#1691

If the tabbar structure/name changes I left a comment there pointing out this code.

In a session with a lot of tabs this code can be 15% of the total parent process time to open a new tab. With this patch it's pretty much zero.

Assignee: nobody → tnikkel
Status: NEW → ASSIGNED
Blocks: 1755676
Pushed by tnikkel@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1130e04a96c1 Don't descend into the chrome tabbar when looking for an async scrollable element to create a display port on. r=botond,emilio
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
See Also: → 2059800
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: