Open Bug 260191 Opened 20 years ago Updated 2 years ago

XUL window reflow inefficiency

Categories

(Core :: XUL, defect)

x86
Windows XP
defect

Tracking

()

People

(Reporter: bernd_mozilla, Unassigned)

Details

(Keywords: perf, testcase, Whiteboard: [reflow-refactor])

Attachments

(2 files)

(deleted), application/vnd.mozilla.xul+xml
Details
(deleted), application/vnd.mozilla.xul+xml
Details
if you look at the reflow log of a simple xul window: <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml" orient="vertical" style="width: 300px"> </window> you will see that it reflows its children tree times with an initial reflow. This is IHMO wrong and the intial reflow is the most expensive reflow (like style change) it forbids any reflow optimization. One would expect a initial reflow and then a resize reflow. But these two unconstrained initial reflows are too much. VP 0249B480 r=0 a=7344,3456 c=7344,3456 cnt=849 root 0249B588 r=0 a=7344,3456 c=7344,3456 cnt=850 place 0249BE84 r=0 a=UC,UC c=UC,UC cnt=851 place 0249BE84 d=0,0 place 0249BE84 r=0 a=UC,UC c=UC,UC cnt=852 place 0249BE84 d=0,0 place 0249BE84 r=0 a=UC,UC c=UC,UC cnt=853 place 0249BE84 d=0,0 area 0249BDCC r=0 a=UC,UC c=UC,UC cnt=854 area 0249BDCC d=0,0 area 0249BDCC r=0 a=UC,UC c=UC,UC cnt=855 area 0249BDCC d=0,0 area 0249BDCC r=0 a=0,UC c=0,0 cnt=856 area 0249BDCC d=0,0 place 0249BE84 r=0 a=7344,UC c=7344,0 cnt=857 place 0249BE84 d=0,0 root 0249B588 d=7344,3456 VP 0249B480 d=7344,3456 I believe this happens at the RefreshSizeCache function http://lxr.mozilla.org/seamonkey/source/layout/xul/base/src/nsBoxToBlockAdaptor.cpp#299 The function itself is not a problem but the callers: nsBoxToBlockAdaptor::GetPrefSize nsBoxToBlockAdaptor::GetMinSize nsBoxToBlockAdaptor::GetAscent If we now look at nsSprocketLayout::Layout we see it first call GetAscent and later the GetPrefSize and GetMinSize and there are the two bogus reflows
Attached file xul window only (deleted) —
Keywords: perf
Summary: XUL window reflow reflow ineffciency → XUL window reflow ineffciency
the mew comment at http://lxr.mozilla.org/seamonkey/source/layout/xul/base/src/nsBoxToBlockAdaptor.cpp#311 is completely wrong for normal frames, it might be with xul frames but html frames can show on every reflow the MEW.
Summary: XUL window reflow ineffciency → XUL window reflow inefficiency
Whiteboard: [reflow-refactor]
QA Contact: xptoolkit.xul
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.xul → xptoolkit.widgets
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: