Closed Bug 1510321 Opened Last year Closed Last year

Stop creating a list of nodes in the DOM for builtin areas in CustomizableUI


(Firefox :: Toolbars and Customization, enhancement, P1)




Firefox 65
Tracking Status
firefox65 --- fixed


(Reporter: Gijs, Assigned: Gijs)


(Blocks 1 open bug)


(Whiteboard: [fxperf:p1])


(1 file)

After bug 1505734 this was pushed into the CUI code. However, it's quite expensive, and with the demise of XPCOM add-ons the list should be fully predictable, meaning we shouldn't need to check the DOM, which would make this code cheaper. Profiles indicate this loses us a few ms on startup. :bgrins has a profile.
Flags: needinfo?(bgrinstead)
Whiteboard: [fxperf:p1]
Here's the referenced profile: I had consistently seen this as ~15ms on a local build pre Bug 1505734.

I just did a new run and am seeing only 3-4ms on registerToolbarNode. This could be either the move away from XBL somehow made this faster, or just inconsistency in measurements (different hardware, OS version, etc). 

`./mach talos-test -a tpaint --gecko-profile` (new window time only) - 3ms -
`./mach talos-test -a ts_paint --gecko-profile --cycles 2` - 4ms -

I'll do a talos-other try push with --talos-profile and see what those look like.
Push with a bunch of profiles: If I click on "open in" on something like ts_paint and filter on "registertoolbarnode" I see generally 2-4ms there as well.

This is less than I remember, but after re-looking at the referenced profile in Comment 1, registerToolbarNode was only a part of the toolbar_XBL_contructor time (~4ms out of ~12). The rest of the time seemed to be firing other XBL constructors (more toolbars and tabbrowser-tabs).

Even still, this is all happening before first paint so even dropping a few ms would be a win.
Flags: needinfo?(bgrinstead)
Blocks: 1395983
Pushed by
avoid calling buildArea for all the builtin toolbars, r=jaws,bgrins
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
You need to log in before you can comment on or make changes to this bug.