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

Store parsed data more similarly to provided data #6814

Merged
merged 2 commits into from
Dec 8, 2019

Conversation

benmccann
Copy link
Contributor

@benmccann benmccann commented Dec 7, 2019

With #6768 merged and parsing: false, the uPlot benchmark is still spending about 10% of its time in _parse. This PR brings it down to a trivial amount.

I think what is happening in master is that by adding a new _parsed attribute to the element that the element can sometimes no longer fit in the memory allocated to it and so new memory must be allocated with the old being garbage collected. By just using the data directly we see a very big speedup

@leeoniya
Copy link

leeoniya commented Dec 7, 2019

hey @benmccann would you mind throwing me a PR into the uPlot repo with the Chart.js updates needed to run the current v3? i'd like to test periodically :)

@benmccann
Copy link
Contributor Author

done! see here: leeoniya/uPlot#65

@kurkle
Copy link
Member

kurkle commented Dec 7, 2019

This is very similar to #6816 in performance:
image

etimberg
etimberg previously approved these changes Dec 7, 2019
@etimberg etimberg merged commit b7caa24 into chartjs:master Dec 8, 2019
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.

None yet

4 participants