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

Regression: serializeHtml now 10x slower #3210

Open
shaungrady opened this issue May 20, 2024 · 4 comments
Open

Regression: serializeHtml now 10x slower #3210

shaungrady opened this issue May 20, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@shaungrady
Copy link
Contributor

shaungrady commented May 20, 2024

Description

Migrating from 30.5.3 to 33.0.0, I'm noticing a huge decrease in the performance of the serializeHtml call. It looks like it occurred with the change in this PR: #3149

I've attached below profiles for the serializeHtml call in the old and new versions with a document consisting of 107 root child nodes.

v30.5.3 (108ms)

image

v33.0.0 (1.2s)

image

Steps to Reproduce

Create a decently sized document of 100+ nodes, execute the serialize call.

Expected Behavior

Environment

  • slate: 0.103.0
  • slate-react: 0.102.0
  • react: 18.2.0
  • browser: Firefox

Bounty

Click here to add a bounty via Algora.

Funding

  • You can sponsor this specific effort via a Polar.sh pledge below
  • We receive the pledge once the issue is completed & verified
Fund with Polar
@shaungrady shaungrady added the bug Something isn't working label May 20, 2024
@zbeyens
Copy link
Member

zbeyens commented May 22, 2024

Thanks for the report. Let’s revert this for now and explore a better solution. Please open a PR at your earliest convenience.

@shaungrady
Copy link
Contributor Author

Sounds good, @zbeyens! I'm not sure how soon I can get to this, so please don't wait on me if you need this addressed urgently.

@dimaanj
Copy link
Collaborator

dimaanj commented Jun 7, 2024

@shaungrady Which version of react you are using btw?

@shaungrady
Copy link
Contributor Author

@dimaanj Good question: 18.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants