Significant delay on page loading (with "no response" on window title)
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox81 | --- | fixed |
People
(Reporter: over68, Assigned: jfkthame)
References
Details
Attachments
(4 files)
+++ This bug was initially created as a clone of Bug #1648355 +++
I can still reproduce bug 1648355 using the STR in comment 8.
Steps to reproduce:
- Download and install all Google Noto Fonts.
- Download Font Loader.
- Download Franklin Gothic Book Regular.ttf.
- Open the Font Loader, Click on the Add Fonts button, Select the font file Franklin Gothic Book Regular.ttf then click Open.
- Click on the Load button.
- Open attachment 9159611 [details].
Note the issue happens because of the 🏴 emoji.
Profiler data https://share.firefox.dev/3fbwWjQ
This also happens on startup.
Steps to reproduce 2:
- Download and install all Google Noto Fonts.
- Open Firefox.
- Open attachment 9159611 [details].
Profiler data https://share.firefox.dev/2X4BSRh
Looks bug 1648355 fix this issue only on Windows 10 VM. Profiler data https://share.firefox.dev/3ilQJyI
Assignee | ||
Comment 3•4 years ago
|
||
I suspect bug 1658207 may help here. Let's see how it looks after that lands.
I can still reproduce this bug after land bug 1658207. Profiler data https://share.firefox.dev/2FhbAVS
I can not reproduce this after remove 🏴 emoji. Profiler data https://share.firefox.dev/2XSwReQ
Assignee | ||
Comment 6•4 years ago
|
||
It looks like the delays in the recent profiles are much shorter than we originally saw in comment 0, but still a lot more than we'd like. The issue is triggered by the flag emoji sequence that includes "tag" characters, which aren't supported by any available font on Windows; these trigger an exhaustive search of all the fonts, and with so many fonts installed, that's slow.
There are a couple of things we may be able to do here, but also, could you please take a similar profile of loading the example in a newly-launched browser, with the gfx.e10s.font-list.shared disabled, for comparison? Thanks.
I can also reproduce in this test case with the steps in comment 0 and comment 1. Profiler data https://share.firefox.dev/2DNPmKL
Profiler log with gfx.e10s.font-list.shared
disabled https://share.firefox.dev/2XS3jyb.
Assignee | ||
Comment 9•4 years ago
|
||
Thanks. Yeah, that example has a codepoint (U+0378) that is unassigned in Unicode, so unsurprisingly, no font supports it; but we try really hard to find one that does.
So your profiles show that with gfx.e10s.font-list.shared
enabled, the reflow is a lot better (8.9s) than it was using the old back-end (52.5s). So that's somewhat encouraging, but I'd still like to improve things further.
Assignee | ||
Comment 10•4 years ago
|
||
There are several things we can do in the font-matching code to mitigate this, by short-circuiting the expensive search in cases where it's not actually useful:
- Trailing codepoints in a cluster that are default-ignorable can just be assigned to the same font as the base character.
- Unassigned Unicode codepoints should be treated like Private Use characters: we allow them to work, but only using a font that is explicitly specified in the
font-family
list. Doing a system-wide fallback for codepoints that have no standardized, interoperable meaning isn't really valid. If the author wants to use such a codepoint, they need to be explicit about the font that's expected to handle it. - In general, default-ignorable characters can be assigned the font of the surrounding text; as they're not going to be visibly rendered, it doesn't matter if the font does not explicitly support them.
These tweaks make it less likely that we'll end up in the worst-case of searching (in vain!) through all the installed fonts (although it's still possible to construct examples that'll hit it).
Assignee | ||
Comment 11•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Comment 12•4 years ago
|
||
Depends on D86943
Assignee | ||
Comment 13•4 years ago
|
||
Depends on D86944
Assignee | ||
Updated•4 years ago
|
Comment 14•4 years ago
|
||
Comment 15•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1643d98700b9
https://hg.mozilla.org/mozilla-central/rev/52e87432fb01
https://hg.mozilla.org/mozilla-central/rev/25eb83f06bda
Description
•