Looking for profiling data and debug internal again. - Gecko side will pass word when finding a space. So it means that wikipedia's long page will call icu_segmenter a lot. (over 10,000). - macOS's heap allocator seems to be slower than other platform. So it causes macOS only regression. - We can optimize unbreakable path for AL, NU, IS and QU when is ASCII. This can reduce allocation number. And we should cleanup nsLineBreaker's fast path. (It doesn't match with UAX14). But it may not be enough. - Create stack only FFI for Line breaker may resolve this, I need to try it.
Bug 1848354 Comment 5 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Looking the profiling data and debug internal again. - Gecko side will pass word when finding a space. So it means that wikipedia's long page will call icu_segmenter a lot. (over 10,000). - macOS's heap allocator seems to be slower than other platform. So it causes macOS only regression. - We can optimize unbreakable path for AL, NU, IS and QU when is ASCII. This can reduce allocation number. And we should cleanup nsLineBreaker's fast path. (It doesn't match with UAX14). But it may not be enough. - Create stack only FFI for Line breaker may resolve this, I need to try it.