Skip to content

fix: cache output number parsing in createStringInterpolator#2547

Merged
joshuaellis merged 2 commits into
pmndrs:nextfrom
literalpie:patch-1
Jun 21, 2026
Merged

fix: cache output number parsing in createStringInterpolator#2547
joshuaellis merged 2 commits into
pmndrs:nextfrom
literalpie:patch-1

Conversation

@literalpie

@literalpie literalpie commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Why

Starting in version 10.1.0, this code is very slow when showing a chart with a large number of points.

What

Instead of calculating the value in every iteration of the loop, the numbers are only calculated once.

Checklist

  • Ready to be merged

@changeset-bot

changeset-bot Bot commented Jun 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4313236

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@react-spring/shared Patch
@react-spring/animated Patch
@react-spring/core Patch
@react-spring/mock-raf Patch
@react-spring/parallax Patch
@react-spring/rafz Patch
@react-spring/types Patch
@react-spring/three Patch
@react-spring/web Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@literalpie literalpie marked this pull request as draft June 19, 2026 22:52
@literalpie

Copy link
Copy Markdown
Contributor Author

heads up: the contributing.md file implies that only maintainers need to worry about changesets, and says

With react-spring we bump every package to the same version, so flag them all

I'm guessing "maintainers only" isn't right based on the above comment, and I'm not sure if "flag them all" is right, since I see other PRs that don't flag all packages

@literalpie literalpie marked this pull request as ready for review June 19, 2026 23:07
@joshuaellis

Copy link
Copy Markdown
Member

Thanks for the contribution, i've done a follow up PR for the contributing recommendations – #2549, thanks for flagging.

@joshuaellis joshuaellis merged commit e8e96a7 into pmndrs:next Jun 21, 2026
20 checks passed
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