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

Replace helpers.extend with Object.assign when available or use helpers.merge #6148

Merged
merged 3 commits into from Mar 19, 2019

Conversation

kurkle
Copy link
Member

@kurkle kurkle commented Mar 19, 2019

Its a lot faster in Chrome (>50%). Not available in IE, so using merge (also >30% faster)

Some performance tests:
https://jsperf.com/extend-vs-shallow-clone
https://jsperf.com/extend-versions

@kurkle kurkle changed the title Use Object.assign as extend when available Replace helpers.extend with Object.assign when available or use helpers.merge Mar 19, 2019
@simonbrunel simonbrunel added this to the Version 2.9 milestone Mar 19, 2019
@simonbrunel simonbrunel merged commit 0d8b8f6 into chartjs:master Mar 19, 2019
@kurkle kurkle deleted the extend branch May 5, 2019 06:41
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.

None yet

4 participants