blocksuite icon indicating copy to clipboard operation
blocksuite copied to clipboard

snapshotToDoc very slow with large snapshot

Open kerituni12 opened this issue 5 months ago • 3 comments

The performance is slower due to the use of nextTick in the _snapshotToBlock method. Specifically, I see the following code:

await new Promise(resolve => nextTick(() => resolve(undefined)));

While nextTick is useful for handling large content during pasting, it can slow down operations when used in snapshotToDoc. It would be beneficial to add a parameter like usingNextTick to snapshotToDoc or explore other approaches to mitigate this issue.

kerituni12 avatar Sep 17 '24 15:09 kerituni12