Open jdanish opened 3 years ago
Yeah, that's exactly what's happening. I was trying to implement a simple "hide" solution, but already we had to do some work getting around updates. The problem with keeping them around is that they will have to update whenever the data changes. And that's exactly what's eating up all the CPU.
Sounds like we need to implement a more sophisticated solution.
My understanding is that the current code avoids updating sub-components if they haven't seen an actual change in data. So the current build shows near-instantaneous (For me) switching between tabs. Doesn't help with the initial hide, but if it is made visible the first time and then updates as it did before I think we are in decent shape. Though it also sounds like the real cuprit is the markdown.
[posted comment in wrong thread -- see #137]
That makes sense. Comparing to the old code, though, switching tables and selecting nodes in a large network is slower than it was before. So it would be nice to re-implement this in the future. So I'm re-opening so that we can revisit in a future round, but it works better for now in the more important ways (initial load) so let's keep it....
It's slower because we do the full render whenever you open the tab with the table. The solution probably is multi-faceted:
Sounds good to me.
If I have time, I'll try to do it. It's definitely a more involved solution than I was hoping for. I had been planning on doing more optimization review, but we'll put that off for now.
Thanks. Our grad student testers report massively improved performance so I don't think it's urgent. But we won't say no to more fixes! Just no rush since I know you have other important projects to work on too ;)
I might be wrong, but it seems like if you click on the node table, then the edge, and then back to the node, it appears to delay as if the node table is re-rendering. Can we re-render only if it has changed? That way only the first render of the tabs takes a long time in the cases where the dataset is massive?