Skip to content

Store parsed data more similarly to provided data#6814

Merged
etimberg merged 2 commits intochartjs:masterfrom
benmccann:parsing
Dec 8, 2019
Merged

Store parsed data more similarly to provided data#6814
etimberg merged 2 commits intochartjs:masterfrom
benmccann:parsing

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.

4 participants