3.01ms uninterruptible reflow at nextStep@chrome://global/content/bindings/progressmeter.xml:83:19

NEW
Unassigned

Status

()

defect
P4
normal
2 years ago
a year ago

People

(Reporter: kmag, Unassigned)

Tracking

(Blocks 1 bug, {perf})

unspecified
Points:
---
Dependency tree / graph
Bug Flags:
qe-verify -

Firefox Tracking Flags

(firefox57 fix-optional, firefox58 wontfix, firefox59 fix-optional)

Details

(Whiteboard: [ohnoreflow][qf:p3][fxperf:p3])

Reporter

Description

2 years ago
Here's the stack:

nextStep@chrome://global/content/bindings/progressmeter.xml:83:19
FrameRequestCallback*nextStep@chrome://global/content/bindings/progressmeter.xml:105:15
FrameRequestCallback*nextStep@chrome://global/content/bindings/progressmeter.xml:105:15
FrameRequestCallback*_init@chrome://global/content/bindings/progressmeter.xml:109:11
progressmeter-undetermined_XBL_Constructor@chrome://global/content/bindings/progressmeter.xml:113:1
PopupNotifications_showPanel@resource://gre/modules/PopupNotifications.jsm:932:9
PopupNotifications_update@resource://gre/modules/PopupNotifications.jsm:1097:9
_onButtonEvent@resource://gre/modules/PopupNotifications.jsm:1480:5
oncommand@chrome://browser/content/browser.xul:1:1
Reporter

Updated

2 years ago
Component: Untriaged → XUL Widgets
Product: Firefox → Toolkit
Whiteboard: [ohnoreflow][qf][photon-performance] → [ohnoreflow][qf][photon-performance] [triage]
The layout flush comes from the call to "stack.boxObject.width" here:
https://dxr.mozilla.org/mozilla-central/rev/7d2e89fb92331d7e4296391213c1e63db628e046/toolkit/content/widgets/progressmeter.xml#82

...in the progressmeter-undetermined "_init" method.

That .width accessor does indeed flush layout (unsurprisingly), via a call from BoxObject::Width() to BoxObject::GetOffsetRect() to BoxObject::GetFrame(), which calls GetPresShell() with aFlushLayout==true:
https://dxr.mozilla.org/mozilla-central/rev/7d2e89fb92331d7e4296391213c1e63db628e046/layout/xul/BoxObject.cpp#110
(In reply to Daniel Holbert [:dholbert] from comment #1)
> The layout flush comes from the call to "stack.boxObject.width" here:
[...]
> ...in the progressmeter-undetermined "_init" method.

Sorry, I meant it's in the <method name="_init"> tag -- but really the flush happens every refresh driver tick (!) via  a requestAnimationFrame callback called "nextStep"
Whiteboard: [ohnoreflow][qf][photon-performance] [triage] → [ohnoreflow][qf:p3][photon-performance] [triage]
(In reply to Daniel Holbert [:dholbert] from comment #2)
> the flush happens every refresh driver tick (!) via  a requestAnimationFrame callback
> called "nextStep"

Ugh :-(.

But this binding seems to only be referenced on Linux: http://searchfox.org/mozilla-central/search?q=progressmeter-undetermined
Reporter

Comment 4

2 years ago
(In reply to Florian Quèze [:florian] [:flo] (away until August 7th) from comment #3)
> (In reply to Daniel Holbert [:dholbert] from comment #2)
> > the flush happens every refresh driver tick (!) via  a requestAnimationFrame callback
> > called "nextStep"
> 
> Ugh :-(.

Yeah, that seemed particularly terrible to me, too...

> But this binding seems to only be referenced on Linux:
> http://searchfox.org/mozilla-central/search?q=progressmeter-undetermined

Huh. Interesting. I wonder why that is...
Reporter

Comment 5

2 years ago
Apparently bug 658829 switched to native progress meters on other platforms.
Flags: qe-verify-
Priority: -- → P3
Whiteboard: [ohnoreflow][qf:p3][photon-performance] [triage] → [ohnoreflow][qf:p3][reserve-photon-performance]
Priority: P3 → P4
Keywords: perf
Whiteboard: [ohnoreflow][qf:p3][reserve-photon-performance] → [ohnoreflow][qf:p3][fxperf]
fxperf:p3 because Linux-only, I would have made it a p2 if other platforms were affected.
Whiteboard: [ohnoreflow][qf:p3][fxperf] → [ohnoreflow][qf:p3][fxperf:p3]
You need to log in before you can comment on or make changes to this bug.