Closed
Bug 23714
Opened 26 years ago
Closed 24 years ago
remove redundant style context resolution for table rows
Categories
(Core :: Layout, defect, P3)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla0.9
People
(Reporter: waterson, Assigned: karnaze)
Details
(Keywords: perf)
Attachments
(3 files)
6.38 KB,
patch
|
Details | Diff | Splinter Review | |
523 bytes,
patch
|
Details | Diff | Splinter Review | |
6.43 KB,
patch
|
Details | Diff | Splinter Review |
Filing a bug just so we don't forget. Remove the redundant style resolution that
we discovered while profiling tree scrolling today.
Updated•26 years ago
|
Status: NEW → ASSIGNED
Target Milestone: M13
Comment 1•26 years ago
|
||
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?
Assignee | ||
Comment 2•26 years ago
|
||
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).
Updated•26 years ago
|
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
Updated•26 years ago
|
Target Milestone: M14 → M15
Comment 5•25 years ago
|
||
*IGNORE* - massive spam changing open XPToolkit bug's QA contact to
jrgm@netscape.com
QA Contact: paulmac → jrgm
Comment 6•25 years ago
|
||
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
Assignee | ||
Updated•25 years ago
|
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
Assignee | ||
Comment 9•25 years ago
|
||
Marking mozilla0.9. This is related to bug 54542.
Target Milestone: M17 → mozilla0.9
Assignee | ||
Comment 10•24 years ago
|
||
Moving to mozilla0.8.1
Target Milestone: mozilla0.9 → mozilla0.8.1
Assignee | ||
Updated•24 years ago
|
Target Milestone: mozilla0.8.1 → mozilla0.9
Assignee | ||
Comment 11•24 years ago
|
||
Comment 12•24 years ago
|
||
+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.
Reporter | ||
Comment 13•24 years ago
|
||
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
Assignee | ||
Comment 14•24 years ago
|
||
Assignee | ||
Comment 15•24 years ago
|
||
Assignee | ||
Comment 16•24 years ago
|
||
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.
Description
•