gfxFontGroup::WhichSystemFontSupportsChar reads too many cmaps on Android when loading dailymail.co.uk
Categories
(Core :: Layout: Text and Fonts, enhancement, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox66 | --- | fixed |
People
(Reporter: mstange, Assigned: mstange)
References
Details
Attachments
(2 files)
Comment 2•6 years ago
|
||
Updated•6 years ago
|
| Assignee | ||
Comment 3•6 years ago
|
||
(In reply to Jonathan Kew (:jfkthame) from comment #2)
Markus, can you reproduce this under a debugger (or with some tracing code
added) to determine what is the first character code we encounter that goes
into gfxPlatformFontList::GlobalFontFallback? Knowing that may help us
figure out if we can adjust something to avoid ending up on the slow path
here.
Here's a profile with some tracing code added: https://perfht.ml/2QZkBmF
Specifically, there's a "Fonts" row in the marker chart.
On my device, we're doing the search because of character 10095, and we end up finding it in the font "noto sans symbols". The search takes around 300ms - 600ms with the profiler running. Adding this font to gfxAndroidPlatform::GetCommonFallbackFonts eliminates that time completely: https://perfht.ml/2R2kTZV
It's now spending 1.4ms instead of ~500ms for the search.
| Assignee | ||
Comment 4•6 years ago
|
||
| Assignee | ||
Comment 5•6 years ago
|
||
I don't know if "Droid Sans Symbols" is a font that exists, I've only observed
"Noto Sans Symbols" on my device.
The block number 0x27 is the block number of char 10095. There might be other
relevant blocks for this font.
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 6•6 years ago
•
|
||
String.fromCharCode(10095) is "\u276f" is "❯"
| Assignee | ||
Comment 8•6 years ago
|
||
Uh, I forgot to correct the commit message. Oh well.
Comment 9•6 years ago
|
||
| bugherder | ||
Description
•