# Editor becomes unusably slow as post gets longer

**URL:** <https://meta.discourse.org/t/editor-becomes-unusably-slow-as-post-gets-longer/240083>\
**Category:** Bug\
**Created:** [September 26, 2022, 1:02pm UTC](https://meta.discourse.org/t/editor-becomes-unusably-slow-as-post-gets-longer/240083 "2022-09-26T13:02:50Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![php\_fan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/php_fan/32/275214_2.png) [@php\_fan](https://meta.discourse.org/u/php_fan)\
**Post date:** [September 27, 2022, 9:43am UTC](https://meta.discourse.org/t/editor-becomes-unusably-slow-as-post-gets-longer/240083/4 "2022-09-27T09:43:44Z")

</div>

> [@RGJ](#):
>
> Nope. Discourse is free and open source software.

Oh, my bad. On the home page I saw a big “try it free” button, which suggested that you can only _try_ it for free, and in the Pricing section there was no mention of a free plan. I should have investigated further, I guess those are hosted plans or something.

> Also, the [https://forum.manjaro.org](https://forum.manjaro.org/) instance has the setting `autohighlight all code`

Yep I already noticed that and guessed it was probably a misconfiguration on their part, but that’s not relevant to the issue. I could have pasted an equally long piece of legitimate javascript code. Or even if the issue is actually triggered only by having code highlighted with the wrong syntax, that doesn’t justify the editor outside of the code becoming sluggish.

> highlighting over 10k+ lines of code in the main browser thread will be perceptible slow on some devices

Yes but there’s no reason for that to be happening while I edit the rest of the post outside of the code block that is highlighted. Regardless of whether you do that in the main thread (obviously wrong - glad to hear you’re working on fixing that) or in the background, once the code has been highlighted and I’m no longer editing it, there shouldn’t be any highlight-related work to be done at all. Any parsing, computing etc related to highlighted only needs to be re-done if one modifies the contents of the code block.

---

_[View the full topic](https://meta.discourse.org/t/editor-becomes-unusably-slow-as-post-gets-longer/240083)._
