Skip to content

[performance] faster major tick calculation#6307

Merged
etimberg merged 3 commits intochartjs:masterfrom
benmccann:perf-major-ticks
Jun 19, 2019
Merged

[performance] faster major tick calculation#6307
etimberg merged 3 commits intochartjs:masterfrom
benmccann:perf-major-ticks

Conversation

@benmccann
Copy link
Contributor

@benmccann benmccann commented May 29, 2019

This is a major speedup when ticks.source is data or labels. The speed up is because it avoids calling startOf on every tick, which is expensive since it creates a moment object and does a non-trivial calculation. It's also necessary to implement #6274 efficiently. I'll rebase that PR and reopen a re-worked version of it after this change and #6304 are merged

Before:
before

After:
after

@etimberg etimberg merged commit b31980e into chartjs:master Jun 19, 2019
@nagix nagix added this to the Version 2.9 milestone Jun 19, 2019
exwm pushed a commit to exwm/Chart.js that referenced this pull request Apr 30, 2021
* [performance] faster major tick calculation

* Address review comments

* Replace isNaN
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.

4 participants