Skip to content

Conversation

@k-yle
Copy link
Collaborator

@k-yle k-yle commented Feb 10, 2026

For changesets that last several hours and affect thousands of elements (example), coreHistory's stack quickly reaches >1GB of JSON, which makes history.toJSON() the perf bottleneck.

Over 99% of time is spent inside this function after ever operation, and we call the function twice in a row for no good reason. We can just reuse the value from a few lines above

@k-yle k-yle added the performance Optimizing for speed and efficiency label Feb 10, 2026
Copy link
Collaborator

@1ec5 1ec5 left a comment

Choose a reason for hiding this comment

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

This calls for a blog post or diary entry or something. 📉

@bryceco
Copy link
Contributor

bryceco commented Feb 10, 2026

It's one of those things where you're happy for the improvement, but embarrassed about the reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Optimizing for speed and efficiency

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants