Skip to content

Node and Edge Tables re-render? #138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jdanish opened this issue Sep 9, 2020 · 8 comments
Open

Node and Edge Tables re-render? #138

jdanish opened this issue Sep 9, 2020 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@jdanish
Copy link
Collaborator

jdanish commented Sep 9, 2020

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?

@jdanish jdanish added the bug Something isn't working label Sep 9, 2020
@benloh
Copy link
Collaborator

benloh commented Sep 9, 2020

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
Copy link
Collaborator Author

jdanish commented Sep 9, 2020

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
Copy link
Collaborator

benloh commented Sep 10, 2020

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

@jdanish
Copy link
Collaborator Author

jdanish commented Sep 10, 2020

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

@jdanish jdanish reopened this Sep 10, 2020
@benloh
Copy link
Collaborator

benloh commented Sep 10, 2020

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

  • lazy load them after the initial render.
  • try to do so in a non-blocking way
  • selectively update on D3DATA updates, rather than updating the whole table, especially on events like node and edge selection.

@jdanish
Copy link
Collaborator Author

jdanish commented Sep 10, 2020

Sounds good to me.

@benloh
Copy link
Collaborator

benloh commented Sep 10, 2020

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
Copy link
Collaborator Author

jdanish commented Sep 10, 2020

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

@benloh benloh mentioned this issue Sep 17, 2020
benloh added a commit that referenced this issue Sep 5, 2024
Infrastructure: Module Architecture Stage 4 - Modular URNET
benloh added a commit that referenced this issue Sep 5, 2024
# Conflicts:
#	_ur_addons/@addons-client.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants