Last Comment Bug 763982 - Arabic-character processing in nsTextFrameUtils::TransformText is out of date
: Arabic-character processing in nsTextFrameUtils::TransformText is out of date
Status: RESOLVED FIXED
: intl
Product: Core
Classification: Components
Component: Layout: Text (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla16
Assigned To: Jonathan Kew (:jfkthame)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-12 09:03 PDT by Jonathan Kew (:jfkthame)
Modified: 2012-06-21 04:04 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
update and optimize Arabic char processing in TransformText (3.49 KB, patch)
2012-06-12 09:03 PDT, Jonathan Kew (:jfkthame)
smontagu: review+
Details | Diff | Splinter Review

Description Jonathan Kew (:jfkthame) 2012-06-12 09:03:06 PDT
Created attachment 632276 [details] [diff] [review]
update and optimize Arabic char processing in TransformText

nsTextFrameUtils::TransformText is responsible for detecting Arabic characters, in order to support the bidi.numeral processing within textruns. However, the macros it uses to identify Arabic characters are out of date with respect to Unicode (they don't account for the Arabic Supplement and Extension blocks). They can also be rewritten slightly to run more efficiently, which is important because TransformText is showing up as a significant contributor to profiles in bug 762710, for example.

The attached patch updates the Arabic character range, and by optimizing the order of comparisons, it also shaves around 5-10ms off the reflow time for the tinderbox log in bug 762710#c0 (on my MBP).
Comment 2 Ed Morley [:emorley] 2012-06-21 04:04:53 PDT
https://hg.mozilla.org/mozilla-central/rev/42e5e3988682

Note You need to log in before you can comment on or make changes to this bug.