WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Slow Pasting of Large Text Content in Slate.js #5945

@electroluxcode

Description

@electroluxcode

Compared to Tiptap, Slate seems to perform poorly when pasting large amounts of data.
I generated test data using:

let text = [];
for (let i = 0; i < 10000; i++) {
  text.push(`${i} this is a test demo. \n`);
}
let res = text.join('');
console.log(res);

Then I pasted the generated text into Slate (https://www.slatejs.org/examples/plaintext) and Tiptap (https://tiptap.dev/docs/examples/basics/default-text-editor) respectively.
Slate took about 7 seconds to parse the content, while Tiptap only took 1 second.

Image

Are there any ways to optimize this?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions