Skip to content

Continous jank in text with 1k rows #2374

Open
@vargab95

Description

@vargab95

Is there an existing issue for this?

Flutter Quill version

master branch

Steps to reproduce

  1. Clone the repo
  2. Go to the example folder
  3. Start the example
  4. Open the performance tab of flutter dev tools
  5. Delete the example text
  6. Paste example + enter 1k times
  7. Click in a row and add one character

Expected results

A document with few thousand rows renders at least with 30 FPS when edited.

Actual results

I've tested with a linux desktop PC (AMD Ryzen 5 5600G). With 1k rows, it rendered in 30-60ms, with 2k rows in 60-80ms, with 4k rows in 100-120ms, with 8k it took 200-250ms. It is more or less exactly O(n). Which means that even when a user edits a document with 1k rows, it will generate a jank frame.

Additional Context

I think, having documents with 1k rows are not so rare in case of a rich text editor.

I've searched through the issues and I've found that in #997 it was already described. However, on master I cannot see the rasterization charts, but jank frames are still problematic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or requestmoderateIssues that are important for improving functionality or user experience.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions