WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
273568
Avoid copying FontPalette and FontVariantAlternates
https://bugs.webkit.org/show_bug.cgi?id=273568
Summary
Avoid copying FontPalette and FontVariantAlternates
Brent Fulgham
Reported
2024-05-01 13:10:33 PDT
Reduce unnecessary copies in our font handling code: (1) FontPalette is a struct containing an enum and an AtomString, and should be returned by const reference to avoid copying that string. (2) FontVariantAlternatives is lightweight, containing only a `Markable`, but the `Markable` is holding a very heavy-weight object that contains Vectors of Strings, and Strings.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-05-01 13:10:48 PDT
<
rdar://problem/127380343
>
Brent Fulgham
Comment 2
2024-05-01 15:05:42 PDT
(3) FontSelectionRequest contains two int16_t's and std::optional<int16_t> (4) FontSelectionCapabilities contains three sub-objects, each holding multiple int16_t values, but always returns a computed copy so not easy to reduce copies.
Brent Fulgham
Comment 3
2024-05-01 15:12:21 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/28009
Brent Fulgham
Comment 4
2024-05-02 09:43:50 PDT
(3) and (4) are too small to have value in passing by reference, so we will leave those as-is.
EWS
Comment 5
2024-05-03 17:21:33 PDT
Committed
278351@main
(371cab863ee8): <
https://commits.webkit.org/278351@main
> Reviewed commits have been landed. Closing PR #28009 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug