Closed Bug 1361115 Opened 8 years ago Closed 1 year ago

1.42ms uninterruptible reflow (sync layout flush) at onResize in tabprompts.jsm

Categories

(Firefox :: Tabbed Browser, enhancement, P4)

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1583696
Performance Impact low

People

(Reporter: mconley, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: perf, Whiteboard: [ohnoreflow][fxperf:p3])

Here's the stack:

onResize@chrome://global/content/tabprompts.xml:254:1
handleEvent@chrome://global/content/tabprompts.xml:212:21
Flags: qe-verify?
Priority: -- → P2
Whiteboard: [ohnoreflow][qf][photon-performance] → [ohnoreflow][qf][photon-performance][qf:p3]
Component: Untriaged → Tabbed Browser
Related stack?

onResize@chrome://global/content/tabprompts.xml:247:1
init@chrome://global/content/tabprompts.xml:175:17
appendPrompt@chrome://browser/content/browser.js:8586:5
openTabPrompt@jar:file:///C:/Program%20Files/Nightly/omni.ja!/components/nsPrompter.js:412:21
openPrompt@jar:file:///C:/Program%20Files/Nightly/omni.ja!/components/nsPrompter.js:535:17
confirmCheck@jar:file:///C:/Program%20Files/Nightly/omni.ja!/components/nsPrompter.js:653:9
reset@moz-extension://4235d50b-dfc6-49ee-9ccb-939c19e9556f/content/report.js:188:9
handleEvent@moz-extension://4235d50b-dfc6-49ee-9ccb-939c19e9556f/content/report.js:235:9
Whiteboard: [ohnoreflow][qf][photon-performance][qf:p3] → [ohnoreflow][[photon-performance][qf:p3]
Priority: P2 → P3
Whiteboard: [ohnoreflow][[photon-performance][qf:p3] → [ohnoreflow][reserve-photon-performance][qf:p3]
Flags: qe-verify? → qe-verify-
Priority: P3 → P4
Keywords: perf
Whiteboard: [ohnoreflow][reserve-photon-performance][qf:p3] → [ohnoreflow][fxperf][qf:p3]
Whiteboard: [ohnoreflow][fxperf][qf:p3] → [ohnoreflow][fxperf:p3][qf:p3]
Flags: needinfo?(gijskruitbosch+bugs)
Blocks: 1530557
Flags: needinfo?(gijskruitbosch+bugs)
Summary: 1.42ms uninterruptible reflow at onResize@chrome://global/content/tabprompts.xml:254:1 → 1.42ms uninterruptible reflow (sync layout flush) at onResize in tabprompts.jsm
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED

Gonna unassign this for now.

There are 2 routes to a solution here:

  • try to fix up the resize handler to wait for reflows and not measure things, set stuff, then measure some more. The unfortunate downside there is flickering, because when we resize the window the dialog is already visible. So this didn't seem like a good fix. The width/height of the dialog content can change as the window resizes (and the max height/width of the dialog change alongside that) so caching doesn't work either.
  • try to use CSS to achieve the same effect. This is hard because just keeping the overflow: auto applied causes us to not use the maximum height for the inner content, which in turn means we end up with scrollbars and bits of the content hidden without there being any need (ie content that does fit still causes scrollbars in the dialog), even after removing lots of the XUL flex around the dialog, including the spacers etc. fit-content is meant to work around this, but IME didn't actually work for XUL. Switching to html:div/html:p for the text containers themselves went slightly better, but still didn't work for wrapped text. I expect that to fully fix this we'll need to convert the entire dialog to HTML, something which is tricky considering there's a bunch of code shared with windowed dialogs that needs to continue to work.

Perhaps this is something browser architecture wants to take on - these dialogs are in need of some serious revamping anyway. But it's not a high priority from a fxperf perspective in the sense that resizes with tabmodal dialogs up aren't really very common.

Assignee: gijskruitbosch+bugs → nobody
Status: ASSIGNED → NEW
Performance Impact: --- → P3
Whiteboard: [ohnoreflow][fxperf:p3][qf:p3] → [ohnoreflow][fxperf:p3]
Severity: normal → S3

The onResize handler for tabprompts (and the clientWidth/clientHeight reads, as well as the getComputedStyle calls) were all removed in bug 1583696.

Status: NEW → RESOLVED
Closed: 1 year ago
Duplicate of bug: 1583696
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.