Skip to content

Conversation

@luin
Copy link
Member

@luin luin commented Jun 29, 2023

This PR improves Quill#setContents performance by using insertBefore() whenever possible.

@luin luin force-pushed the zh-insert-contents branch 10 times, most recently from c6f6269 to 99bf79f Compare June 30, 2023 09:15
@luin luin marked this pull request as ready for review June 30, 2023 09:33
block.formatAt(0, length, key, value);
});

return block;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing to:

    return block.statics.requiredContainer
      ? block.wrap(block.statics.requiredContainer.blotName)
      : block;

Decreases the rendering time for /stress by 500ms but not super sure if it's safe so this PR leaves it out.

@luin luin requested a review from jhchen June 30, 2023 11:30
@luin luin force-pushed the zh-insert-contents branch from 99bf79f to 4435ac0 Compare June 30, 2023 13:02
@luin luin force-pushed the zh-insert-contents branch from 4435ac0 to 3da269c Compare June 30, 2023 14:12
@luin luin merged commit 7938b70 into develop Jul 5, 2023
@luin luin deleted the zh-insert-contents branch July 5, 2023 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants