mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
This patch introduces a per-Gfx::Font cache for harfbuzz text shaping results. As long as the same OpenType features are used, we now cache the results of harfbuzz shaping, saving massive amounts of time during text layout. As an example, it saves multiple seconds when loading the ECMAScript specification at <https://tc39.es/ecma262>. Before this change, harfbuzz shaping was taking up roughly 11% of a profile of loading that page. The cache brings it down to 1.8%. Note that the cache currently grows unbounded. I've left a FIXME about adding some limits.
368 B
368 B