NEW305636
Google Fonts page loads extremely slowly in WebKit
https://bugs.webkit.org/show_bug.cgi?id=305636
Summary Google Fonts page loads extremely slowly in WebKit
Daniel Jalkut
Reported 2026-01-16 05:20:16 PST
Created attachment 478042 [details] Instruments trace of Safari's WebKit process loading the page Loading the URL: https://fonts.google.com/noto/specimen/Noto+Color+Emoji in Safari takes about 30 seconds on my M4 Max MacBook Pro. Analysis under Instruments suggests the page's WebKit rendering process spends an inordinate amount of time in OTSVG, presumably handling OpenType-SVG fonts. I'm attaching two Instruments traces. One of the Safari/WebKit web process, and one of the Brave/Chrome web process, each loading the same page. The Chrome renderer finishes in a fraction of a second.
Attachments
Instruments trace of Safari's WebKit process loading the page (6.70 MB, application/zip)
2026-01-16 05:20 PST, Daniel Jalkut
no flags
Instruments trace of Brave's Chrome process loading the page (4.12 MB, application/zip)
2026-01-16 05:20 PST, Daniel Jalkut
no flags
Daniel Jalkut
Comment 1 2026-01-16 05:20:51 PST
Created attachment 478043 [details] Instruments trace of Brave's Chrome process loading the page
Radar WebKit Bug Importer
Comment 2 2026-01-16 06:56:46 PST
Alexey Proskuryakov
Comment 3 2026-01-16 18:58:23 PST
It's spending all the time in CTFontGetBoundingRectsFromGlyphs, executed via Element.offsetWidth() and Element.offsetLeft(). Creating a whole new SVG document each time. When I tested this on my Mac, I saw an even worse issue after switching from this tab and back, it was hung in the same way, but in normal layout, not any JavaScript program.
Simon Fraser (smfr)
Comment 4 2026-01-16 19:12:17 PST
It's spending time CoreSVG, not WebKit's SVG code.
Rod S
Comment 5 2026-02-05 18:43:54 PST
> The Chrome renderer finishes in a fraction of a second. It might not be using svg for Chrome. For context, Google Fonts will use COLR version 1 (https://learn.microsoft.com/en-us/typography/opentype/spec/colr) instead of using svg (https://learn.microsoft.com/en-us/typography/opentype/spec/svg) if it thinks the browser supports it. COLRv1 should be smaller and faster. Try requesting https://fonts.googleapis.com/css2?family=Noto+Color+Emoji, at the bottom it should tell you the selcted format, for example: body { --google-font-color-notocoloremoji:colrv1; }
Daniel Jalkut
Comment 6 2026-02-05 21:25:49 PST
(In reply to Rod S from comment #5) > It might not be using svg for Chrome. For context, Google Fonts will use > COLR version 1 Good thought. I did the test from Chrome and did see a colrv1 tag at the bottom as you suggested. So I guess the question is whether the SVG is inherently slow or if this represents a performance improvement opportunity.
Note You need to log in before you can comment on or make changes to this bug.