Closed Bug 1537587 Opened 1 year ago Closed 1 year ago

We can spend lots of time resolving fonts for wikipedia.org on FireTV/GeckView

Categories

(Core :: Graphics: Text, defect)

52 Branch
Unspecified
Android
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox66 --- wontfix
firefox67 --- fixed
firefox68 --- fixed

People

(Reporter: jesup, Assigned: jfkthame)

References

()

Details

(Keywords: perf, Whiteboard: [gv][qf:p1:pageload][geckoview:fenix:m4])

Attachments

(1 file)

With a FireTV/GeckoView build, font searching/loading can take a lot of time, including a lot of time apparently in read().

Here's a profile with markers from Markus on font searching:

https://perfht.ml/2TFIsxG

Markus noted that one of the glyphs we fail to find.

Flags: needinfo?(jfkthame)
Keywords: perf
Whiteboard: [gv][qf]

Looks like gfxAndroidPlatform::GetCommonFallbackFonts is missing the Noto versions of some language-specific fonts, where it lists only Droid Sans versions; in particular, adding Noto Sans Armenian ought to help this profile.

Flags: needinfo?(jfkthame)
Assignee: nobody → jfkthame

Note that while the patch here should help with cases like the Armenian that shows up in this profile, it'll still be possible to hit the "worst-case" behavior if the page has characters that are not actually supported by any installed font.

So this issue isn't really resolved by this patch, it's just an attempt to eliminate some of the cases where it happens. It's highly dependent on what characters are present in the page.

Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/25ebfc26acfc
Add Noto fonts for more languages to Android version of GetCommonFallbackFonts. r=lsalzman
Whiteboard: [gv][qf] → [gv][qf:p1:pageload]
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68

Jonathan, can you please uplift this Noto font fix to 67 Beta when you return from PTO? Fenix 1.0 will ship GeckoView 67. Wikipedia is a popular mobile site, so it would be good fix this in Fenix 1.0.

Flags: needinfo?(jfkthame)
OS: Unspecified → Android
Whiteboard: [gv][qf:p1:pageload] → [gv][qf:p1:pageload][geckoview:fenix:m4]

Comment on attachment 9052451 [details]
Bug 1537587 - Add Noto fonts for more languages to Android version of GetCommonFallbackFonts. r?lsalzman

Beta/Release Uplift Approval Request

  • Feature/Bug causing the regression: n/a
  • User impact if declined: Poor font fallback performance for some scripts on modern Android devices that ship Noto fonts
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Trivial patch just adds some font names to known fallbacks.
  • String changes made/needed: n/a
Flags: needinfo?(jfkthame)
Attachment #9052451 - Flags: approval-mozilla-beta?

(In reply to Chris Peterson [:cpeterson] from comment #7)

Jonathan, can you please uplift this Noto font fix to 67 Beta when you return from PTO? Fenix 1.0 will ship GeckoView 67. Wikipedia is a popular mobile site, so it would be good fix this in Fenix 1.0.

Sure; there's no reason not to do this, it's a trivial fix. Note that we can still hit the worst-case code path where we search all installed fonts; it depends exactly what's present in the content of the page. This improves things for a number of scripts but isn't a universal fix.

Comment on attachment 9052451 [details]
Bug 1537587 - Add Noto fonts for more languages to Android version of GetCommonFallbackFonts. r?lsalzman

Perf impact for Geckoview which ships in 67, low risk patch on Nightly for a week, uplift approved for our next 67 beta, thanks.

Attachment #9052451 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.