mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-20 08:51:04 +00:00

Turns out that `nsFind::BreakInBetween()` is called a lot, especially for large documents. If `nsFind::Find()` is then called in a loop (e.g. for creating a text directive), the alloc cost for the word segmenter shows up in profiles. This can be avoided by having the segmenter be a member of `nsFind`. Differential Revision: https://phabricator.services.mozilla.com/D227804