Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.

Perf optimizations #27

Closed
wants to merge 3 commits into from
Closed

Perf optimizations #27

wants to merge 3 commits into from

Conversation

divmain
Copy link

@divmain divmain commented Feb 18, 2016

This PR is in support of FormidableLabs/victory-chart#93. It include one hot-path performance improvement, as well as a multi-arg memoization function that is consumed by victory-chart.

It looks like I have to update a couple of tests for getStyles. Also, this PR will probably have to wait until after the victory-core merge.

/cc @boygirl @coopy

return function () {
const args = Array.prototype.slice.call(arguments);
const hash = args.map((arg) => {
return (typeof arg === "string" || typeof arg === "number") ? arg : JSON.stringify(arg);
Copy link
Contributor

Choose a reason for hiding this comment

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

This won't work for function args; it might be worth noting in a comment.

Copy link
Author

Choose a reason for hiding this comment

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

Good thought.

@divmain
Copy link
Author

divmain commented Feb 23, 2016

I'm moving this PR over to victory-core, will check back here in case you reply @ryan-roemer.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants