Attached please find suggested changes that, using a simple test case of my own devising, improve by 4-5% the time to render a Roman string of 69 words using "text-rendering: optimizeLegibility". These changes have no effect on "run-webkit-tests --complex-text fast/text".
Created attachment 63357 [details] Proposed changes.
<rdar://problem/8237336>
Comment on attachment 63357 [details] Proposed changes. This looks good. > - RetainPtr<CFMutableDataRef> m_coreTextIndicesData; > + Vector<CFIndex, 64> m_coreTextIndicesVector; Maybe m_coreTextIndicesStorage would be a better name? Or m_coreTextIndicesBuffer? The name should communicate the fact that we should access this through the m_coreTextIndices pointer and not directly. > + m_coreTextIndicesVector.reserveCapacity(m_stringLength); Since this is always used on a new vector, you could use reserveInitialCapacity for slightly better performance. r=me without additional changes, but you might want to do one of the improvements above. If you decide not to do either improvement, please let a committer know so they can set commit-queue+ on the bug.
(In reply to comment #3) > Maybe m_coreTextIndicesStorage would be a better name? Or m_coreTextIndicesBuffer? The name should communicate the fact that we should access this through the m_coreTextIndices pointer and not directly. Since the naming of the new member variable matches that of the existing m_glyphsVector and m_advancesVector, I think I'll leave this one as is. > Since this is always used on a new vector, you could use reserveInitialCapacity for slightly better performance. Sounds like a plan!
Created attachment 63364 [details] Changes per review.
Comment on attachment 63357 [details] Proposed changes. Cleared Darin Adler's review+ from obsolete attachment 63357 [details] so that this bug does not appear in http://webkit.org/pending-commit.
Comment on attachment 63364 [details] Changes per review. Clearing flags on attachment: 63364 Committed r64734: <http://trac.webkit.org/changeset/64734>
All reviewed patches have been landed. Closing bug.