Closed
Bug 69143
Opened 24 years ago
Closed 4 years ago
nsStyleUtil::FindNonTransparentBackground 7% of window paint time
Categories
(Core :: CSS Parsing and Computation, defect, P5)
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: mikepinkerton, Unassigned)
References
Details
(Keywords: perf)
In profiles of updating the damaged area of a window and painting,
nsStyleUtil::FindNonTransparntBackground shows up as 7%.
That's a pretty big chunk.
Reporter | ||
Updated•24 years ago
|
Comment 1•24 years ago
|
||
Here are the places where FindNonTransparentBackground() is called:
nsCSSRendering::PaintBorder() always
nsCSSRendering::PaintOutline() always
nsCSSRendering::PaintBorderEdges() always
nsCSSRendering::RenderSide() NS_STYLE_BORDER_STYLE_OUTSET
INSET, RIDGE, and GROOVE
Note that RenderSide() is called up to 4 times in PaintRoundedBorder() which is
called 4 times in PaintBorder().
It could be a good idea to add the following code at the very beginning of
PaintBorder() and PaintOutline():
// look for a quick way out
PRBool noBorder = PR_TRUE;
for (PRIntn i = 0; i < 4; i ++) {
PRUint8 borderStyle = aBorderStyle.GetBorderStyle(i);
if (borderStyle != NS_STYLE_BORDER_STYLE_NONE
&& borderStyle != NS_STYLE_BORDER_STYLE_HIDDEN) {
noBorder = PR_FALSE;
break;
}
}
if (noBorder) {
return;
}
I'm keeping this bug for now because or its relation to bug 43457.
FindNonTransparentBackground() is probably the reason why we fetch
eStyleStruct_Color so often in GetStyleData(). It's one of the 4 structs that
are fetched the most often, with Display, Text and Position.
I'll do some tests by implementing FindNonTransparentBackground() inside the
StyleContext itself and see if we have any noticeable results.
Status: NEW → ASSIGNED
Summary: nsStyleUtil::FindNonTransparntBackground 7% of window paint time → nsStyleUtil::FindNonTransparentBackground 7% of window paint time
Target Milestone: --- → mozilla0.9.1
Comment 2•24 years ago
|
||
The fix in bug 70831 required to implement FindNonTransparentBackground() in the
style context. We could make it a public interface and call it from nsStyleUtil.
It would be more efficient.
It would be nice to implement in the style context some other utility functions
that fetch only the most used properties instead of the entire structure they
belong to. For instance, we could fetch just the display type instead of the
nsStyleDisplay structure.
Updated•24 years ago
|
Target Milestone: mozilla0.9.3 → mozilla0.9.4
Updated•24 years ago
|
Target Milestone: mozilla0.9.4 → mozilla1.0
Updated•23 years ago
|
Keywords: mozilla1.0
Comment 4•23 years ago
|
||
Moving to mozilla1.1. Engineers are overloaded!
Target Milestone: mozilla1.0 → mozilla1.1
Comment 5•23 years ago
|
||
Bulk moving from Moz1.1 to future-P1. I will pull from this list when scheduling
work post Mozilla1.0.
Priority: -- → P1
Target Milestone: mozilla1.1 → Future
Comment 6•23 years ago
|
||
cc'ing myself
Assigning pierre's remaining Style System-related bugs to myself.
Assignee: pierre → dbaron
Status: ASSIGNED → NEW
Priority: P1 → P3
Comment 8•22 years ago
|
||
Isn't this cross-platform?
Comment 9•22 years ago
|
||
This bug is targeted at a Mac classic platform/OS, which is no longer supported
by mozilla.org. Please re-target it to another platform/OS if this bug applies
there as well or resolve this bug.
I will resolve this bug as WONTFIX in four weeks if no action has been taken.
To filter this and similar messages out, please filter for "mac_cla_reorg".
OS: Mac System 9.x → MacOS X
Assignee: dbaron → nobody
QA Contact: ian → style-system
Comment 10•16 years ago
|
||
This bug hasen't been touched for years and is clearly unowned. Moving back to default assignee/QA so that people, who are watching those can accurately triage this bug.
Also resetting Priority, Target Milestone, Status Whiteboard and Status.
Priority: P3 → --
Target Milestone: Future → ---
Priority: -- → P5
Comment 11•4 years ago
|
||
Closing this as resolved:incomplete since there has been no activity on this issue in the past 13 years. Please re-open if this is further valid and should be worked on in the future.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•