Slow data loading

Hello, I have a problem here. I use the model.setKeyForNodeData(data, data.key) method to update my node data, but it does not take effect. Am I using it wrong?
Correct it, the data has been updated, but the graph has not been updated.
And also, I use model.commit((m) => { m.set(m, 'nodeDataArray', nodeDataArray) }, 'flash') this method to initialize the loading data will be very slow, sometimes the browser will crash, if I select all nodes to use this method to follow all the new node data, it will be very slow and sometimes the browser will crash.
Please help me, thanks!

If data is currently in model's Model.nodeDataArray, model.setKeyForNodeData(data, data.key) should have no effect, because you are setting its key to its current value.

For your second situation, it depends on what is in the new Array.