Efficient Viewport rendering? (like CodeMirror)

Just a quick question!

The excellent CodeMirror editor supports extremely large amounts of lines since it only renders visible lines when necessary.

A quick test on the ProseMirror Demo shows that ProseMirror doesn’t seem to do this.

Testing ~50,000 lines in ProseMirror: typing is very laggy, and entering new lines is much, much worse. Enter the same text in the CodeMirror Demo and it renders and edits with no conceivable delay.

Does ProseMirror have the same / or a similar viewport rendering system like CodeMirror? Or is it planned for future versions?

No, it doesn’t, and this is intentionally out of scope, because it was already hugely complicated to get right in a plain text editor like CodeMirror, and I don’t want to bloat and complicate this library with this functionality.

I know this can be useful to have, but I’m not tackling it.

1 Like

seems to be a big difference between my old and new boxes … my new one (Core i7 7th gen 8gb mem yey) seems to handle lots of lines gracefully while the old one chokes …

@marijn I’d like to learn more about how this would be done. Would it be possible for you to outline a brief overview of how you’d go about attacking this?

I have no idea how to cleanly do that. And that’s why I didn’t do it.