react-vis icon indicating copy to clipboard operation
react-vis copied to clipboard

Cache Child Props

Open Xiot opened this issue 4 years ago • 2 comments

Cache the child props to prevent React from re-rendering unnessesarily. The biggest culprits were the default accessors. The defaults for each attribute are now computed once, and re-used when required.

Xiot avatar May 02 '20 17:05 Xiot

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Chris Thomas seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar May 02 '20 17:05 CLAassistant

Using the 5th graph on the showcase (Line Chart Canvas - in svg mode) I was able to increase the fps while hovering over the graph from about 5 fps to 60 fps.

To see this I changed the Plots section to just show the one graph. Otherwise the GPU renderer thread in chrome struggled to keep up.

Xiot avatar May 02 '20 17:05 Xiot