How much content is too much for a codemirror editor?

I’m using codemirror 6 in a small web project and I’m trying to understand how much content it can comfortably handle before performance becomes noticeable. For example, if an editor contains a few thousand lines of html or javascript, are there any particular settings or extensions that I should be careful with? I’m especially interested in scrolling performance, syntax highlighting, and autocomplete. Are there recommended approaches for keeping the editor responsive as the document gets larger? Id appreciate any suggestions from people who have used CodeMirror with larger documents.

I think the best way to find out would be to try and see. It should perform very well even for large documents, but some extensions, like for example linting, act on the whole document so they’ll become noticeably slow at some point.

1 Like