Skip to content

[Bug / Perf]: Line-breaking bottleneck on massive unspaced text blocks (CJK / Gutenberg EPUBs) #28

Closed

Description

@DrkXo

Summary

When rendering documents with long paragraphs lacking whitespace (common in East Asian / CJK literature, text conversions, and long strings), RenderHyperBox layout suffers severe slowdowns, causing UI freezes lasting 10–15+ seconds per chapter.


Real-World Sample

  • Document: Project Gutenberg Dream of the Red Chamber (紅樓夢) — pg24264-images-3.epub
  • Observed: Section 1 contains long unspaced Chinese paragraphs (up to ~14,000 characters in a single <p>), taking ~13.4 seconds in RenderHyperBox.layout.

Activity

  1. added a commit that references this issue on Oct 10, 2026
  2. vietnguyentuan2019 commented on Oct 10, 2026

    @vietnguyentuan2019
    Contributor

    Fixed by #29 (thanks @DrkXo 🙏) and merged to main in #27 (merge commit ef062d9). It will ship in 1.13.0 — not published to pub.dev yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions