Skip to content

[WASM] Load ICU break dictionaries on demand instead of embedding them in every app #26049

Open

Description

@MartinZikmund

What would you like to be added? 💡

On WebAssembly, embed only the ICU data Uno needs at startup, and load the break dictionaries on demand.

Why is this needed? 🤔

uno.icu-wasm embeds a 5.5 MB icudt.dat (2.46 MB brotli) into every app's head assembly. Of that:

  • 2.0 MB brotli are the brkitr/*.dict dictionaries, which ICU only consults for Thai, Lao, Khmer, Myanmar and CJK text.
  • 0.4 MB are top-level locale .res files that break iteration never reads.

The rules and *.icu tables Uno uses are 72 KB brotli. A blank app's assembly drops from 2.53 MB to 134 KB brotli, and startup on 4G (9 Mbps, 85 ms RTT) improves by ~1.8 s.

The minimal data plus the dictionaries give break results identical to the full data on 1,560 samples (15 scripts, 26 locales, word/line/sentence/character). A dictionary package registered later through udata_setCommonData is picked up by new break iterators.

For which platforms 📱💻🖥️

WebAssembly

Anything else we need to know? 💬

Opt-out: UnoWasmIcuDictionariesOnDemand=false.

Activity

  1. self-assigned this
    on Nov 4, 2026
  2. added
    kind/enhancement
    platform/wasm 🌐
    area/performance 📈
    on Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/performance 📈kind/enhancementplatform/wasm 🌐

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions