Menu

How We Fixed a 37-Second System ANR in Flutter RichText (Justify + Syllable Hyphenation + Bionic Reading)
📰

How We Fixed a 37-Second System ANR in Flutter RichText (Justify + Syllable Hyphenation + Bionic Reading)

DEV Community: mobile·Roman Fofanov·about 9 hours ago
#kYw0U4ZG
#devtomobile#devto#dev#chapter#visible
Long article (739 words) — no AI summary yet.
Reading 0:00
15s threshold

Unit tests are dangerously polite. They pass a 200-character Lorem Ipsum paragraph into a Flutter widget tree, assert findsOneWidget , and turn green in 40 milliseconds.

Real books are not 200 characters long.

While preparing v1.2.5 of Lector ( app.lectorreader.audiobook ), an offline Android EPUB/PDF audiobook reader written in Flutter, we ran a physical Hardware-in-the-Loop (HIL) test on a $180 Redmi Note 13 (Snapdragon 685, Android 14) opening a 40,000+ -character chapter of The Adventures of Sherlock Holmes with three popular typography toggles turned on at the same time:

Full justification ( TextAlign.justify )

Automatic visible syllable hyphenation ( - )

Bold Word Starts (bionic reading)

The screen froze completely.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.