-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
The performance of the editor begins to degrade when the document size gets reasonably large, especially when performing edits.
I ran some profiles with 500 paragraphs of text loaded. (from https://loremipsum.io/generator/?n=500&t=p)
It seems like the main issue is that the entire widget is re-drawn and re-laid-out on every edit. Meaning, every line of text is re-drawn on every frame, regardless of if it changed, or not. I think this should be avoidable. I also profiled https://github.com/superlistapp/super_editor and there was no jank when editing large documents, perhaps insight can be gained from there.
A couple of smaller issues:
Rasterization is slow on every frame, this seems to be due to the cursor blinking, but it only happens on larger documents, so I assume it's redrawing the whole document when the cursor blinks, or something like that.
Also, in RawEditorStateTextInputClientMixin calling "Document.toPlainText()" and diffing that against the editor text seems to be very slow for large documents.

