Bug 190517 - [PSON] Prewarm system fallback fonts
Summary: [PSON] Prewarm system fallback fonts
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-10-12 05:21 PDT by Antti Koivisto
Modified: 2018-10-15 09:03 PDT (History)
7 users (show)

See Also:


Attachments
patch (10.83 KB, patch)
2018-10-12 05:32 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff
patch (10.90 KB, patch)
2018-10-12 06:42 PDT, Antti Koivisto
rniwa: review+
Details | Formatted Diff | Diff
patch (10.91 KB, patch)
2018-10-15 04:46 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff
patch (10.80 KB, patch)
2018-10-15 04:53 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff
patch (10.65 KB, patch)
2018-10-15 08:25 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2018-10-12 05:21:07 PDT
Looking for system fallbacks is expensive. We can prewarm them for processes that are likely need them.
Comment 1 Antti Koivisto 2018-10-12 05:32:01 PDT
Created attachment 352159 [details]
patch
Comment 2 Antti Koivisto 2018-10-12 06:42:14 PDT
Created attachment 352165 [details]
patch
Comment 3 Ryosuke Niwa 2018-10-12 10:09:22 PDT
Comment on attachment 352165 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=352165&action=review

> Source/WebCore/page/ProcessWarming.cpp:93
> +    prewarmInformation.fontCache = FontCache::singleton().collectPrewarmInformation();
> +    return prewarmInformation;

Can't we just do this?:
return { FontCache::singleton().collectPrewarmInformation() };

> Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:1538
> +    if (prewarmInformation.seenFamilies.isEmpty() && prewarmInformation.fontNamesRequiringSystemFallback.isEmpty())

Maybe we can add PrewarmInformation::isEmpty?
Comment 4 Antti Koivisto 2018-10-15 04:46:55 PDT
Created attachment 352308 [details]
patch
Comment 5 Antti Koivisto 2018-10-15 04:53:29 PDT
Created attachment 352310 [details]
patch
Comment 6 Antti Koivisto 2018-10-15 08:25:29 PDT
Created attachment 352323 [details]
patch
Comment 7 WebKit Commit Bot 2018-10-15 09:02:45 PDT
Comment on attachment 352323 [details]
patch

Clearing flags on attachment: 352323

Committed r237116: <https://trac.webkit.org/changeset/237116>
Comment 8 WebKit Commit Bot 2018-10-15 09:02:46 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Radar WebKit Bug Importer 2018-10-15 09:03:44 PDT
<rdar://problem/45272576>