netcreateorg / netcreate-2018

Please report bugs, problems, ideas in the project Issues page: https://github.com/netcreateorg/netcreate-2018/issues
Other
11 stars 2 forks source link

Node and Edge Tables re-render? #138

Open jdanish opened 3 years ago

jdanish commented 3 years ago

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?

benloh commented 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.

jdanish commented 3 years ago

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.

benloh commented 3 years ago

[posted comment in wrong thread -- see #137]

jdanish commented 3 years ago

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....

benloh commented 3 years ago

It's slower because we do the full render whenever you open the tab with the table. The solution probably is multi-faceted:

jdanish commented 3 years ago

Sounds good to me.

benloh commented 3 years ago

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.

jdanish commented 3 years ago

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 ;)