Closed Bug 599813 Opened 14 years ago Closed 14 years ago

nsSVGGlyphFrame::getCharacterData is expensive avoid calling it too many times

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0b7

People

(Reporter: longsonr, Assigned: longsonr)

Details

(Keywords: perf)

Attachments

(1 file, 1 obsolete file)

With large amounts of text and xmlspace:default getCharacterData can be expensive as it needs to compress the whitespace in the text node. This is called more times than it used to be.

To avoid we should recode GetEffectiveXY, GetEffectiveDxDy and GetEffectiveRotate to take an additional PRInt32 numChars and pass this in rather than having each method call GetNumberOfChars to obtain it.
Summary: nsSVGGlyphFrame::getCharacter data is expensive avoid calling it too many times → nsSVGGlyphFrame::getCharacterData is expensive avoid calling it too many times
Keywords: perf
Attached patch patch (obsolete) — Splinter Review
This is not a functional change. It is covered by the existing reftests for bug 333698 and bug 388547.
Assignee: nobody → longsonr
Attachment #482235 - Flags: review?(roc)
Attachment #482235 - Flags: feedback?(taken.spc)
Comment on attachment 482235 [details] [diff] [review]
patch

Simple performance fix, already functionally covered by a number of tests so low risk.
Attachment #482235 - Flags: feedback?(taken.spc) → approval2.0?
Attachment #482235 - Attachment is obsolete: true
Keywords: checkin-needed
Whiteboard: [needs landing]
http://hg.mozilla.org/mozilla-central/rev/fcf6f703d87d
Status: NEW → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: [needs landing]
Target Milestone: --- → mozilla2.0b8
Version: unspecified → Trunk
Target Milestone: mozilla2.0b8 → mozilla2.0b7
You need to log in before you can comment on or make changes to this bug.