Closed Bug 1367004 Opened 7 years ago Closed 6 years ago

[Input Latency] Firefox is 200% (27 ms) slower than Chrome in case Facebook - click to close chat tab

Categories

(Core :: General, defect, P3)

defect

Tracking

()

RESOLVED WORKSFORME
Performance Impact ?

People

(Reporter: bobby.chien+bugzilla, Unassigned, NeedInfo)

References

(Blocks 1 open bug, )

Details

(Keywords: perf, Whiteboard: [QRC][QRC_Analyzed])

User Story

STR:
0. Logged in with Whitehat account, timeline page
1. Click on a name in the chat panel on the right, Wait for the chat window to open
2. Click the (x) to close the chat window

Gecko Profiles:
1. https://perfht.ml/2qK9CU9 

Short Gecko Profile(cover only Input Lantency action):
https://perfht.ml/2rif2pK

Reports: https://goo.gl/w9GuAJ
Notes: https://docs.google.com/spreadsheets/d/1MsTK1FW88wuLd25A18HG2KqpjYJnvrxGM9a6MeZp35w/edit#gid=256706414
No description provided.
Whiteboard: [qf] → [qf][QRC_NeedAnalysis]
User Story: (updated)
Ready for QRC profile analysis but not yet ready for QF triage.
Whiteboard: [qf][QRC_NeedAnalysis] → [QRC][QRC_NeedAnalysis]
Mike, I couldn't find the results for Chrome. Could you update the notebook?
Flags: needinfo?(mlien)
the data from Chrome was always show result within one frame and framework didn't handle that time. you can refer to https://github.com/Mozilla-TWQA/Hasal-result/pull/13
Flags: needinfo?(mlien)
Summary: [Input Latency] Facebook - click to close chat tab → [Input Latency] Firefox is 200% (27 ms) slower than Chrome in case Facebook - click to close chat tab
Kaku, could you help to have first profiling? Thanks.
Assignee: nobody → kaku
Flags: needinfo?(kaku)
Sean, can you help with profiling analysis on this since Kaku is on PTO.
Assignee: kaku → sstangl
Kaku, could you help the profiling analysis? Thanks.
Assignee: sstangl → kaku
Sure, will do.
Flags: needinfo?(kaku)
Kaku, could you help the profiling? Thanks.
Flags: needinfo?(kaku)
After examining the profile, two things stand out. (1) After the click event (clicking on the (x) button on the FB chat box, I guess), it takes a while to do run a callback function (20 ms) which includes a reflow operation (9 ms), this should be the "shrinking" annimation of closing the chat box. So here is the click event: https://perf-html.io/public/e851713ba51554b60a52b0c139fac0c055cfaf86/calltree/?hiddenThreads=1-4-3-2&range=1.3288_1.3877&thread=5&threadOrder=1-4-3-2-0-5&transforms=f-combined-07 The callback function: https://perf-html.io/public/e851713ba51554b60a52b0c139fac0c055cfaf86/calltree/?hiddenThreads=1-4-3-2&range=1.3813_1.5601&thread=5&threadOrder=1-4-3-2-0-5&transforms=f-combined-07~f-combined-7tx6x7x6xdxex6xfx6xhx6xix6xAvxB8xBbxBcxBdx6I3KgKjLvx6xEuxFdx6Klxix6xGaxGbxGcxGdxizq_n Here is the period of reflow: https://perf-html.io/public/e851713ba51554b60a52b0c139fac0c055cfaf86/calltree/?hiddenThreads=1-4-3-2&range=1.3813_1.5601&thread=5&threadOrder=1-4-3-2-0-5&transforms=f-combined-07~f-combined-7tx6x7x6xdxex6xfx6xhx6xix6xAvxB8xBbxBcxBdx6I3KgKjLvx6xEuxFdx6Klxix6xGaxGbxGcxGdxizq_n~f-combined-_nyK9x6xGexInxIoZmIvLgO6FbxcyK9ZoZpZqOeOfOgOhxIq (2) There is a red jank which marked as "DispatchSynthMouseOver" and takes 49 ms to handle mouse events and restyling. https://perf-html.io/public/e851713ba51554b60a52b0c139fac0c055cfaf86/calltree/?hiddenThreads=1-4-3-2&range=1.6479_1.6974&thread=5&threadOrder=1-4-3-2-0-5 I think we need graphics folk to see if the reflow and restyle are reasonable or not.
Flags: needinfo?(kaku)
Assignee: kaku → nobody
tracking under quantum flow
Whiteboard: [QRC][QRC_NeedAnalysis] → [qf][QRC][QRC_Analyzed]
Bug 1377253 might help here (optimizing flex reflow) - of the 9ms reflow noted in comment 9, 6ms is spent in nsFlexContainerFrame stuff. Looks like mconley thinks bug 1396980 will help too. Triaging as [qf:investigate] to follow up after that bug is fixed (and/or to find other optimization opportunities), since we don't have any known-actionable possibilities for improvement at this point.
Depends on: 1377253
Whiteboard: [qf][QRC][QRC_Analyzed] → [qf:investigate][QRC][QRC_Analyzed]
Priority: -- → P3
Keywords: perf
I just profiled the STR from comment 0 in latest nightly, and here's what I'm seeing (starting from the click event to open the chat): https://perfht.ml/2T8OgvQ (this is on the "marker table" page, filtered for reflow, to show how long the reflows are) The longest reflow I'm seeing there is 1.8ms long, much better than 9ms from comment 9. And it looks like only 7ms *total* is spent in nsFlexContainerFrame::Reflow across the whole STR. So I think this is WORKSFORME. Bobby, would you mind reprofiling and seeing if we're still behind here?
Flags: needinfo?(bobby.chien+bugzilla)
Let's call this WORKSFORME, per comment 12. (Though re-analysis would be nice if we can get it, to validate.)
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
Performance Impact: --- → ?
Whiteboard: [qf:investigate][QRC][QRC_Analyzed] → [QRC][QRC_Analyzed]
You need to log in before you can comment on or make changes to this bug.