| Summary: | Optimize layout of Font to reduce padding | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> | ||||
| Component: | Text | Assignee: | Simon Fraser (smfr) <simon.fraser> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | darin, heycam, mmaxfield, simon.fraser, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Local Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Simon Fraser (smfr)
2023-02-05 21:56:23 PST
Created attachment 464861 [details]
Patch
Comment on attachment 464861 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=464861&action=review > COMMIT_MESSAGE:9 > +Reduces size from 1272 to 1256 bytes. That is a lot of bytes! The padding was not a significant fraction. I wonder what the big users are and if this really needs to be over 1000 bytes. (In reply to Darin Adler from comment #3) > Comment on attachment 464861 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=464861&action=review > > > COMMIT_MESSAGE:9 > > +Reduces size from 1272 to 1256 bytes. > > That is a lot of bytes! The padding was not a significant fraction. I wonder > what the big users are and if this really needs to be over 1000 bytes. The large members (see the second column): +80 < 56> const WebCore::FontPlatformData m_platformData +164 < 64> WebCore::GlyphMetricsMap<float>::GlyphMetricsPage m_primaryPage +248 <896> WebCore::GlyphMetricsMap<std::__1::optional<WebCore::Path> >::GlyphMetricsPage m_primaryPage That last one could be heap allocated? I guess heap allocated might not be an improvement. Unless it’s often missing, in which case it would indeed be an improvement! Committed 259896@main (c62b38e4e53b): <https://commits.webkit.org/259896@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 464861 [details]. |