mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
5d71758742
The expensive part of creating a segmenter is doing the locale and UCD data lookups at creation time. Instead of doing this once per text node, cache the segmenters on the document, and clone them as needed (cloning is much, much cheaper). On a profile loading Ladybird's GitHub repo, the following hot methods changed as follows: ChunkIterator ctor: 6.08% -> 0.21% Segmenter factory: 5.86% -> 0% Segmenter clone: N/A -> 0.09% |
||
---|---|---|
.. | ||
Libraries | ||
Services | ||
Utilities |