Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve inserting performance #3815

Merged
merged 4 commits into from
Jul 5, 2023
Merged

Improve inserting performance #3815

merged 4 commits into from
Jul 5, 2023

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 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.

2 participants