Editor becomes unusably slow as post gets longer

Interesting, I can’t see to reproduce it here:

I see that this forum is behind on updates. Last week I merged a change that updates the HighlightJS library to it’s latest version, which will makes this a lot faster.

Also, the https://forum.manjaro.org instance has the setting autohighlight all code, which is not a good idea for a support forum where most posts with codeblocks will be simple log files and not actual code. I’d suggest their team to disable that ASAP.

Other than that, highlighting over 10k+ lines of code in the main browser thread will be perceptible slow on some devices, which is super easy to see when opening a GitHub diff on an Android phone. We have plans on making that happen in a background JS worker, but it has some drawbacks and we haven’t got to it yet.

3 Likes