Conversation
|
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. |
|
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 |
tests/utils/data-utils-tests.js
Outdated
| t.deepEqual(transformValueToString(0), 0, | ||
| 'Shouldn\'t transform the number value'); | ||
| t.deepEqual(transformValueToString(new Date(0)), 'Thu Jan 01 1970', | ||
| t.deepEqual(transformValueToString(new Date(43200000)), 'Thu Jan 01 1970', |
There was a problem hiding this comment.
This value is 12:00 PM which should play nicer with timezone differences.
src/plot/xy-plot.js
Outdated
| } | ||
| }; | ||
|
|
||
| _childPropCache = Object.create(null) |
There was a problem hiding this comment.
I'm a bit hestiant to add a cache instead of relying on useMemo. How about we wait till the modernization to React 16.8 (#1316) and useMemo instead (after some refactoring of this prop cloning behavior perhaps to using context)?
Alternatively, if you'd like to try out what this looks like via the modernize branch. Feel free to go for it.
d747435 to
a2e3f1c
Compare
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.
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.