0.92ms uninterruptible reflow at PopupNotifications_showPanel@resource://gre/modules/PopupNotifications.jsm:932:9
Categories
(Toolkit :: PopupNotifications and Notification Bars, defect, P4)
Tracking
()
Performance Impact | low |
People
(Reporter: rjward0, Unassigned)
References
Details
(Keywords: perf, perf:frontend, perf:responsiveness, Whiteboard: [ohnoreflow])
Updated•8 years ago
|
Comment 1•8 years ago
|
||
Updated•8 years ago
|
Updated•8 years ago
|
Updated•8 years ago
|
Updated•8 years ago
|
Comment 3•8 years ago
|
||
Updated•8 years ago
|
Updated•8 years ago
|
Updated•8 years ago
|
Updated•7 years ago
|
Comment 5•7 years ago
|
||
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•6 years ago
|
Comment 6•6 years ago
|
||
Updated•5 years ago
|
Updated•5 years ago
|
Updated•3 years ago
|
Updated•2 years ago
|
Updated•1 years ago
|
Comment 7•9 months ago
|
||
This code was changed significantly in bug 1815769, it now uses .checkVisibility()
instead of getBoundingClientRect()
.
Gijs, do you know if checkVisibility
flushes? If not, we can close this bug.
Comment 8•9 months ago
|
||
Certainly not Gijs, but
- The checkVisibility implementation
https://searchfox.org/mozilla-central/rev/a06d5a8871b1796f2dbd588ab518eaa98507e018/dom/base/Element.cpp#703-742- Uses nsIContent::GetPrimaryFrame, which can cause flushes
https://searchfox.org/mozilla-central/rev/a06d5a8871b1796f2dbd588ab518eaa98507e018/dom/base/Element.cpp#253-275- However, checkVisibility has a ChromeOnly
flush
option to control this behavior
https://searchfox.org/mozilla-central/rev/a06d5a8871b1796f2dbd588ab518eaa98507e018/dom/webidl/Element.webidl#207
- However, checkVisibility has a ChromeOnly
- Uses nsIContent::GetPrimaryFrame, which can cause flushes
Comment 9•9 months ago
|
||
(In reply to Florian Quèze [:florian] from comment #7)
This code was changed significantly in bug 1815769, it now uses
.checkVisibility()
instead ofgetBoundingClientRect()
.Gijs, do you know if
checkVisibility
flushes? If not, we can close this bug.
As Greg notes, this will currently flush.
I imagine that in some cases we'll want to flush here (or at least wait for a flush to have happened before trying to show the popupnotification). I imagine that disentangling this may prove somewhat fragile. Do you have ideas for how to design the API such that consumers don't have to worry about this but also we don't cause sync flushes? Maybe we can make showing these async and use the relevant async APIs like promiseDocumentFlushed
to obtain visibility information for everything?
(note that there is a fun twist here that PopupNotifications
just uses tabbrowser.selectedTab
, which could potentially change while the code is running, if we make the code async)
Comment 10•8 months ago
|
||
It's likely that the way to avoid the sync flush would be to wait for an async one, but if we are waiting for the result to display something, we might either introduce flicker, or delay showing the popup by at least one frame. I'm not sure either is desirable. So no obvious idea about what to do, I was mostly checking if we could close the bug; looks like the answer is no.
Description
•