Bug 254490 - Serialising web fonts duplicates the font custom data in the GPUP
Summary: Serialising web fonts duplicates the font custom data in the GPUP
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Matt Woodrow
URL:
Keywords: InRadar
Depends on:
Blocks: 268233
  Show dependency treegraph
 
Reported: 2023-03-26 16:55 PDT by Matt Woodrow
Modified: 2024-01-27 14:48 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Woodrow 2023-03-26 16:55:32 PDT
In the Web Process, all Font instances from the same web font share the same underlying font data (via Font::CreationData).

When we serialise fonts to the GPUP we serialise the font data each time, resulting in extra memory usage and time spent parsing the data each time.

<rdar://106965215>
Comment 1 Matt Woodrow 2023-03-26 17:17:58 PDT
Pull request: https://github.com/WebKit/WebKit/pull/11987
Comment 2 Matt Woodrow 2023-03-28 16:47:37 PDT
Pull request: https://github.com/apple/WebKit/pull/502
Comment 3 EWS 2023-03-29 01:06:17 PDT
Committed 262263@main (b917345920e9): <https://commits.webkit.org/262263@main>

Reviewed commits have been landed. Closing PR #11987 and removing active labels.
Comment 4 Fujii Hironori 2023-03-30 13:44:22 PDT
Regressed: Bug 254708 – REGRESSION(262263@main) [Win] ASSERTION FAILED: !HashTranslator::equal(KeyTraits::emptyValue(), key) in font tests
Comment 5 Simon Fraser (smfr) 2023-03-30 14:58:59 PDT
Right; reverting via bug 254774.
Comment 6 Matt Woodrow 2023-03-30 23:26:56 PDT
Re-opening for pull request https://github.com/WebKit/WebKit/pull/12221
Comment 7 EWS 2023-03-31 12:37:34 PDT
Committed 262435@main (403125028b31): <https://commits.webkit.org/262435@main>

Reviewed commits have been landed. Closing PR #12221 and removing active labels.