hi all! it seems like it's been a known issue for a while that font-lock is slow on very long lines. i've tried lots of optimizations - jit-lock/lazy-lock, font-lock-maximum-decoration, etc. - but even on modern hardware, fontifying still hangs my emacs for 5-10s on long lines, e.g. 10k-20k characters, whenever they appear. i'm thinking of adding an opt-in line length limit to font-lock-mode, after which it would stop fontifying, evaluating regexps, etc. within each line. i'd love to hear opinions on whether that makes sense, and whether you might consider accepting it into trunk. thanks in advance! -- https://snarfed.org/