Closed
Bug 764005
Opened 12 years ago
Closed 12 years ago
optimize gfxFontGroup::FindFontForChar for the most common case, and lift array Length() accesses out of other loops in font code
Categories
(Core :: Graphics: Text, defect)
Core
Graphics: Text
Tracking
()
RESOLVED
FIXED
mozilla16
People
(Reporter: jfkthame, Assigned: jfkthame)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
smontagu
:
review+
|
Details | Diff | Splinter Review |
There's no reason for gfxFontGroup::FontListLength to be virtual; and we can reduce the overhead of accessing the mFonts array by getting the Length and Elements pointer into local variables instead of repeatedly using the nsTArray methods and GetFontAt() within loops.
Attachment #632294 -
Flags: review?(jdaggett)
Assignee | ||
Comment 1•12 years ago
|
||
Extending this bug to cover more cases where we can optimize by pulling nsTArray::Length() accesses out of loops, etc., and more importantly, optimize gfxFontGroup::FindFontForChar by handling the most common case (a normal character available in the first font of the group) at the beginning of the function. When reflowing the tinderbox log mentioned in bug 762710 comment 0 on my MBPro, this patch reduces the total time spent in gfxFontGroup::FindFontForChar (as recorded by Instruments) from about 650-700ms to around 260ms.
Assignee: nobody → jfkthame
Attachment #632294 -
Attachment is obsolete: true
Attachment #632294 -
Flags: review?(jdaggett)
Attachment #634600 -
Flags: review?(jdaggett)
Assignee | ||
Updated•12 years ago
|
Summary: optimize access to the mFonts array in gfxFontGroup → optimize gfxFontGroup::FindFontForChar for the most common case, and lift array Length() accesses out of other loops in font code
Updated•12 years ago
|
Attachment #634600 -
Flags: review?(jdaggett) → review+
Assignee | ||
Comment 2•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/5c22222c03a5
Target Milestone: --- → mozilla16
Comment 3•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/5c22222c03a5
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•