Files
deckcraft/crates/engine
Ayoze Torres 7c891de450 Spell check: don't check words longer than 100 characters (#1175)
Dictionary::check splits a word at every point looking for compound
parts, so a check costs O(n²) in the word's length under a compounding
dictionary (German, Dutch, …). A 100,000-character "word" took about
17 s per check in release, and spell check runs again on every edit.
suggest() was already capped at 64 characters; check() wasn't.

Words longer than MAX_CHECK_CHARS (100, Hunspell's word length limit)
now pass unchecked.
2026-10-28 01:01:00 +00:00
..