Closed Bug 1362542 Opened 7 years ago Closed 7 years ago

4.26ms uninterruptible reflow at _updateTabsVisibilityStatus@chrome://browser/content/tabbrowser.xml:7481:1

Categories

(Firefox :: Tabbed Browser, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 55
Iteration:
55.7 - Jun 12
Performance Impact low
Tracking Status
firefox55 --- fixed

People

(Reporter: sfleiter, Assigned: dao)

References

(Blocks 1 open bug)

Details

(Whiteboard: [ohnoreflow][reserve-photon-performance])

Attachments

(1 file)

Here's the stack:

_updateTabsVisibilityStatus@chrome://browser/content/tabbrowser.xml:7481:1
onxblpopupshowing@chrome://browser/content/tabbrowser.xml:7591:11
Happens when clicking on the down arrow (listing open tabs) right next to the new tab button every time for me
Component: Untriaged → Tabbed Browser
Flags: qe-verify?
Priority: -- → P2
Whiteboard: [ohnoreflow][qf][photon-performance] → [ohnoreflow][qf:p3][photon-performance]
Flags: qe-verify? → qe-verify-
Flags: needinfo?(dao+bmo)
Priority: P2 → P3
Whiteboard: [ohnoreflow][qf:p3][photon-performance] → [ohnoreflow][qf:p3][reserve-photon-performance]
Assignee: nobody → dao+bmo
Status: NEW → ASSIGNED
Flags: needinfo?(dao+bmo)
Priority: P3 → P1
Comment on attachment 8871655 [details]
Bug 1362542 - Avoid flusing layout when updating tabs' visiblity status for the overflow menu.

https://reviewboard.mozilla.org/r/143176/#review147528

Thanks for looking at this! The patch looks reasonable, but I have a question:

_updateTabsVisibilityStatus is called both from the popupshowing event handler, and from a 'scroll' event listener. For the popupshowing case, the user hasn't interacted very recently with the tab strip so I think there's no doubt that getBoundsWithoutFlushing will get correct results. For the case where the user scrolls through the tab strip while the panel is open, I'm less sure (I can't test this on Mac where the native menu popup eats all mouse events). Have you verified that scrolling the tabstrip still updates the visible tabs correctly? If not, do we need to call _updateTabsVisibilityStatus from a MozAfterPaint listener for the 'scroll' case?

Unrelated to what the patch changes: I wonder how this code performs when there are many tabs. Would adding a binary search for the position of the first visible tab be worth the effort (potentially in a follow-up)?
(In reply to Florian Quèze [:florian] [:flo] (away until Monday May 29th) from comment #4)
> Comment on attachment 8871655 [details]
> Bug 1362542 - Avoid flusing layout when updating tabs' visiblity status for
> the overflow menu.
> 
> https://reviewboard.mozilla.org/r/143176/#review147528
> 
> Thanks for looking at this! The patch looks reasonable, but I have a
> question:
> 
> _updateTabsVisibilityStatus is called both from the popupshowing event
> handler, and from a 'scroll' event listener. For the popupshowing case, the
> user hasn't interacted very recently with the tab strip so I think there's
> no doubt that getBoundsWithoutFlushing will get correct results. For the
> case where the user scrolls through the tab strip while the panel is open,
> I'm less sure (I can't test this on Mac where the native menu popup eats all
> mouse events). [...]

This doesn't work on any platform. I'll remove the scroll event listener.
Comment on attachment 8871655 [details]
Bug 1362542 - Avoid flusing layout when updating tabs' visiblity status for the overflow menu.

https://reviewboard.mozilla.org/r/143176/#review147666

Thanks!
Attachment #8871655 - Flags: review?(florian) → review+
Pushed by dgottwald@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/90075cb286d6
Avoid flusing layout when updating tabs' visiblity status for the overflow menu. r=florian
https://hg.mozilla.org/mozilla-central/rev/90075cb286d6
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
Iteration: --- → 55.7 - Jun 12
Performance Impact: --- → P3
Whiteboard: [ohnoreflow][qf:p3][reserve-photon-performance] → [ohnoreflow][reserve-photon-performance]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: