All users were logged out of Bugzilla on October 13th, 2018

Create widgets for <xul:panel>s lazily or at least not for background tabs/inactive docShells

NEW
Unassigned

Status

()

4 years ago
6 months ago

People

(Reporter: ttaubert, Unassigned)

Tracking

({perf})

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
Due to about:newtab having three <xul:panel>s we hit a case where even though there is no active about:newtab instances (all of them are in background tabs) the RefreshDriver was constantly querying the XServer for client offsets. This overhead of poll()ing and waiting for XServer responses had a 50-100% performance impact.

We should either create widgets for panels lazily or not create them when the docShell is inactive.
Widget code creates the widgets when it is told.  I'm not sure of the correct component here, but delayed widget creation would not be the role of widget code.
(Slow GetClientOffset() is a widget bug, but I think it also makes sense to delay widget creation until required.)
Component: Widget: Gtk → XP Toolkit/Widgets: XUL
(Reporter)

Comment 2

4 years ago
Filed bug 1077652 for caching GetClientOffset() values.

Comment 3

4 years ago
This already happens for menus and some panels. Since many panels that would cause a performance issue are arrow panels, the simplest way to improve this is to change nsMenuPopupFrame::IsLeaf to return true for arrow panels, or use some other attribute or heuristic, as some panels may need to be generated upfront.
Moving to Core:XUL per https://bugzilla.mozilla.org/show_bug.cgi?id=1455336
Component: XP Toolkit/Widgets: XUL → XUL
You need to log in before you can comment on or make changes to this bug.