I am working on a React and Redux application that uses ImmutableJS to store all of it's state. The app receives data from a sensor at about 100 Hz. I need to draw a graph that updates in real time and displays this data. I have been using React-Vis for the graph, the problem is that it takes an array of objects and not an ImmutableJS data structure.
I have solved this by converting the ImmutableJS data structure to an array like this:
const data = this.props.HEGPercentage.toIndexedSeq().toArray()
This works but the problem I am encountering is massive lag if I run this with real data, I think because it has to create a new array all the time.
How can I create a high performance solution for this and still use ImmutableJS?