Skip to content

Conversation

@jason-simmons
Copy link
Member

b5162c9 Use the SkParagraph text renderer by default (flutter/engine#28912)

b5162c9 Use the SkParagraph text renderer by default (flutter/engine#28912)
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@flutter-dashboard flutter-dashboard bot added the engine flutter/engine related. See also e: labels. label Jan 25, 2022
@skia-gold
Copy link

Gold has detected about 5 new digest(s) on patchset 1.
View them at https://flutter-gold.skia.org/cl/github/97180

@jason-simmons jason-simmons merged commit 55e8a2c into flutter:master Jan 25, 2022
@Hixie
Copy link
Contributor

Hixie commented Jan 25, 2022

this was landed in a way that included disabling flutter/tests tests (flutter/tests#123) and that broke the packages repo.

In general if we need to land something in a way that violates our usual processes, we should make everyone extremely aware of this, at a minimum notifying the #announcements and #tree-status channels and making sure people are ready for any upstream breakage.

@zanderso
Copy link
Member

@jason-simmons SkiaPerf has detected regressions for this change: https://flutter-flutter-perf.skia.org/e/?begin=1642805039&end=1643168414&keys=Xf98240cb6f1160c361037486d85f96fa&requestType=0&xbaroffset=27306

Are these expected? The flutter gallery transition perf worst frame increasing by 4x seems fairly severe.

@jason-simmons
Copy link
Member Author

I tried running various Gallery iOS benchmarks on an iPhone 7. But so far I've been unable to reproduce the large change in worst_frame_build_time_millis.

Also not sure why this would only affect iOS benchmarks. I have not seen anything like that in the Android benchmarks.

@jason-simmons
Copy link
Member Author

I did some profiling of Gallery startup on iOS with SkParagraph. One aspect of SkParagraph that may be contributing to increased startup time is SkShaper's font loader.

SkShaper's create_hb_face is calling SkTypeface::openStream to load font assets into memory. The implementation used on iOS (SkTypeface_Mac::onOpenStream) calls various CoreText APIs to read font metadata and extract the font's tables. This appears to be more expensive than the approach used by Libtxt/Minikin.

Gallery needs to load several fonts during startup. This is a one-time cost - after the font is loaded SkShaper stores it in a cache.

@zanderso
Copy link
Member

SkShaper's create_hb_face is calling SkTypeface::openStream to load font assets into memory. The implementation used on iOS (SkTypeface_Mac::onOpenStream) calls various CoreText APIs to read font metadata and extract the font's tables. This appears to be more expensive than the approach used by Libtxt/Minikin.

Can any of this work be done asynchronously or ahead-of-time? Can SkParagraph adopt the faster approach of libtxt? @jason-simmons can you follow up on this with the Skia folks?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engine flutter/engine related. See also e: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants