Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 636c5cbd authored by Ibrahim Yilmaz's avatar Ibrahim Yilmaz
Browse files

Use HYPHENATION_FREQUENCY_FULL_FAST

Usage BREAK_STRATEGY_HIGH_QUALITY and HYPHENATION_FREQUENCY_FULL penaltised 2.5 times in Text calculations.
HYPHENATION_FREQUENCY_FULL should resolve bad performance.

TLDR; a combination of {highQuality, Balanced}x{HyhpnationNormal, HyphnationFull}  causes a bad performance on Text.

Bug: 269125657
Test: Code Review & checking stacktrace.
Change-Id: I07be68508145b87598ad2408e697e1f6c6edfd8f
parent 7cfd239b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ public class ImageFloatingTextView extends TextView {
                .setIncludePad(getIncludeFontPadding())
                .setUseLineSpacingFromFallbacks(true)
                .setBreakStrategy(Layout.BREAK_STRATEGY_HIGH_QUALITY)
                .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_FULL);
                .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_FULL_FAST);
        int maxLines;
        if (mMaxLinesForHeight > 0) {
            maxLines = mMaxLinesForHeight;