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

Optimizations for preformatted data #1212

Merged

Conversation

MxFr
Copy link

@MxFr MxFr commented Dec 20, 2018

I found some more optimization potential while profiling our chart components. This is more specific than my other pull requests, but can provide worthwhile performance benefits for users are willing to adapt the input data so that victory can consume it without preprocessing.

Both changes target cases where the creation of new objects is not required, if the data that is supplied to a victory component already matches the internal data format.

@boygirl
Copy link
Contributor

boygirl commented Dec 21, 2018

So the usage of this would look like:

<VictoryArea
  data={[ { _x: 0, _y0: 1, _y: 2 } ...]}
  x="_x"
  y="_y"
  y0="_y0"
/>

This change makes sense to me, and because of the very specific requirement for data accessor values, I don't expect it to cause any breaking changes or unexpected behavior.

@boygirl
Copy link
Contributor

boygirl commented Jan 2, 2019

@MxFr Sorry about the timing. Do you have a moment to rebase and run prettier so we can get this merged?

Max Fritzsche added 2 commits January 7, 2019 08:20
If the datum already contains a baseline creating a new new object via
assign is not neccecary.
@MxFr MxFr force-pushed the optimze-formatData-for-preformatted-data branch from 6d1e5b9 to 9b9fc32 Compare January 7, 2019 07:22
@MxFr
Copy link
Author

MxFr commented Jan 7, 2019

Sorry for being so unresponsive, but I was on a vacation over chrismas. The rebase to prettier is now done.

@boygirl boygirl merged commit 3918381 into FormidableLabs:master Jan 7, 2019
@boygirl
Copy link
Contributor

boygirl commented Jan 7, 2019

I'll get these released tonight :)

@MxFr MxFr deleted the optimze-formatData-for-preformatted-data branch January 8, 2019 13:10
@boygirl
Copy link
Contributor

boygirl commented Jan 8, 2019

Released as [email protected]

@na9da na9da mentioned this pull request Dec 2, 2019
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants