Skip to content

Conversation

@benmccann
Copy link
Contributor

Minor performance improvement. Saves two calls to getMeta and three to getScaleForId for each data point

Copy link
Member

@kurkle kurkle left a comment

Choose a reason for hiding this comment

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

Good little optimization.
Couple of bytes could be saved more, but those might be worth wasting for readability. I'm ok either way.

@simonbrunel simonbrunel added this to the Version 2.9 milestone May 8, 2019
@simonbrunel simonbrunel merged commit f093c36 into chartjs:master May 8, 2019
@simonbrunel simonbrunel changed the title Cache scales Cache getScaleForId() calls in the line controller May 8, 2019
exwm pushed a commit to exwm/Chart.js that referenced this pull request Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants