Skip to content

[All] Various Performance Issues #997

@Blquinn

Description

@Blquinn

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.

image

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.

image

Also, in RawEditorStateTextInputClientMixin calling "Document.toPlainText()" and diffing that against the editor text seems to be very slow for large documents.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions