Bug 119318 - Optimize Font CodePath selection and more unit testing
Summary: Optimize Font CodePath selection and more unit testing
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BlinkMergeCandidate
Depends on:
Blocks:
 
Reported: 2013-07-30 21:31 PDT by Ryosuke Niwa
Modified: 2016-01-12 21:01 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2013-07-30 21:31:26 PDT
Consider merging https://chromium.googlesource.com/chromium/blink/+/27b957eb64988bb40a244deb856dd3185cb36c03

Replaces the long sequences of if statements in Font::characterRangeCodePath, Font::isCJKIdeograph and Font::isCJKIdeographOrSymbol
with a hash set and/or binary tree lookup (with a little bit of early out and surrogate glyph
testing).

Also here is additional unit testing for these font code path checks.

Perf tests show no regression and no speedup, although we are unlikely to have much perf coverage of these glyphs, if any. I don't see how we could possible be slower for most cases, and we would only be slower in complex cases if the glyphs happen to hit one of the early if tests. Note that in the old code, Font::isCJKIdeograph and Font::isCJKIdeographOrSymbol went through every if statement before returning false, despite the fact that the bulk of common glyphs could be trivially rejected as being lower than any of the ranges.

There is an obvious error at the very end of
Font::isCJKIdeographOrSymbol which is fixed in this patch.
Comment 2 Brent Fulgham 2016-01-08 17:32:21 PST
Myles, does this seem useful or relevant anymore? If not, I'd like to close the bug.