Closed
Bug 244651
Opened 21 years ago
Closed 21 years ago
nsTextFrame::Reflow does too much work
Categories
(Core :: Layout: Text and Fonts, defect)
Core
Layout: Text and Fonts
Tracking
()
RESOLVED
FIXED
People
(Reporter: bryner, Assigned: bryner)
References
Details
(Keywords: perf)
Attachments
(1 file)
|
10.95 KB,
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
TextStyle is a stack-based object that is used to avoid recomputing
frequently-used style data for text frames during a given call to Reflow(),
Paint(), etc. However, TextStyle doesn't discriminate between the Reflow and
Paint cases, and as a result it spends time getting colors (from the style
context and the LookAndFeel) when they aren't to be used for anything.
I have a patch which makes a TextPaintStyle class (a subclass of TextStyle) that
contains the extra color data. Local testing shows almost a 2% improvement in
Tp from this (redwood tinderbox showed only about 1%; the average will probably
be somewhere in between).
| Assignee | ||
Comment 1•21 years ago
|
||
This also removes some overzealous initialization and nulling out of members in
the TextStyle object. Hopefully there's no subtle reason I missed that those
pointers were nulled out in the dtor.
| Assignee | ||
Comment 2•21 years ago
|
||
Comment on attachment 149282 [details] [diff] [review]
patch
One more thing... I simply removed mVisibility; it's not used for anything.
Attachment #149282 -
Flags: superreview?(bzbarsky)
Attachment #149282 -
Flags: review?(bzbarsky)
Comment 3•21 years ago
|
||
Comment on attachment 149282 [details] [diff] [review]
patch
Looks reasonable. r+sr=bzbarsky
Attachment #149282 -
Flags: superreview?(bzbarsky)
Attachment #149282 -
Flags: superreview+
Attachment #149282 -
Flags: review?(bzbarsky)
Attachment #149282 -
Flags: review+
| Assignee | ||
Comment 4•21 years ago
|
||
checked in.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•