victory-chart icon indicating copy to clipboard operation
victory-chart copied to clipboard

[EXPERIMENT] VictorySelectionContainer (don't merge)

Open chrisbolin opened this issue 7 years ago • 0 comments

The big change is that onMouseMove does not use the victory event system; instead it simply uses a function that manipulates local state of the container.

Big question: Could we make the Victory Event System this fast?

Demo at http://localhost:3000/#/performance. This demo shows both VictorySelectionContainer and new "VictorySelectionContainerX", with 2000 points each. The only change in performance is during mouse moves. On my machine this when from 4.8 FPS to 11.5 FPS.

We would need some sort of "hint" to in an event to say "this only modifies the parent, not anything else." In this case onMouseMove has no effects to data or labels, so none of that calculation should have to be done.

(Obvious disclaimer: this is a hacky experiment. It uses a global var to allow the static defaultEvents to call a instance method.)

chrisbolin avatar Apr 18 '18 22:04 chrisbolin