Closed Bug 23714 Opened 26 years ago Closed 24 years ago

remove redundant style context resolution for table rows

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla0.9

People

(Reporter: waterson, Assigned: karnaze)

Details

(Keywords: perf)

Attachments

(3 files)

Filing a bug just so we don't forget. Remove the redundant style resolution that we discovered while profiling tree scrolling today.
Status: NEW → ASSIGNED
Target Milestone: M13
cc'ing karnaze and troy. The issue here is that during table frame construction we resolve style contexts more than once. Since this is a very expensive operation, it shows up on the profiling radar. I was thinking of adding an optional additional parameter to COnstructFrame, a child style context... if not null, then ConstructFrame wouldn't call ResolveStyleContext again. Sound good?
Related to this, we should convert all of the reflow code to use the new pointers that troy added to the reflow state (e.g. mStyleDisplay, mStylePosition, mStyleSpacing).
Sounds okay to me
Target Milestone: M13 → M14
BULK MOVE: Changing component from XUL to XP Toolkit/Widgets: XUL. XUL component will be deleted.
Component: XUL → XP Toolkit/Widgets: XUL
Target Milestone: M14 → M15
*IGNORE* - massive spam changing open XPToolkit bug's QA contact to jrgm@netscape.com
QA Contact: paulmac → jrgm
Giving this to karnaze. Fix at your leisure, Chris. Bug isn't high priority.
Assignee: hyatt → karnaze
Status: ASSIGNED → NEW
Summary: remove redundant style context resolution for tree rows → remove redundant style context resolution for table rows
mass move to m16
Target Milestone: M15 → M16
Status: NEW → ASSIGNED
Target Milestone: M16 → M17
marking perf, cc'ing some folks who might have time and motivation to do this. Style resolution is expensive, and style contexts are large.
Keywords: perf
Marking mozilla0.9. This is related to bug 54542.
Target Milestone: M17 → mozilla0.9
Moving to mozilla0.8.1
Target Milestone: mozilla0.9 → mozilla0.8.1
Target Milestone: mozilla0.8.1 → mozilla0.9
Component: XP Toolkit/Widgets: XUL → Layout
Keywords: patch
+PRBool +NeedFrameFor(nsIFrame* aParentFrame, + nsIContent* aChildContent) +{ + // don't create a whitespace frame if aParentFrame doesn't want it + if (IsOnlyWhiteSpace(aChildContent)) { + nsFrameState state; + aParentFrame->GetFrameState(&state); + if (NS_FRAME_EXCLUDE_IGNORABLE_WHITESPACE & state) { + return PR_FALSE; + } + } + return PR_TRUE; +} PERF: I would suggest swaping, and testing the state bit first. It is cheaper and would be set only on comparatively few frames, so leading to a rapid exit, with no QI for nsITextContent.
Looks good modulo what rbs said. Also, make NeedsFrameFor() be ``static'', since it's not used outside this file. Do that, and [s]r=waterson
The patch is in. This helps bug 54542 a bit.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: