BusinessOptics / dash_interactive_graphviz

An interactive graphviz viewer for Dash
MIT License
37 stars 8 forks source link

Highlighted graph update takes much longer to be rendered #36

Open balamurugan15 opened 6 months ago

balamurugan15 commented 6 months ago

Hi there, I'm using a callback on selected_node and I update the graph to highlight the node. However, the updated graph takes forever to be shown. I'm wondering if the zoom settings etc affect the rendering latency of the updated graph.

The first time rendering w/o any highlighting is much faster and there is negligible delay. I zoom in, select a node and it easily take >5 mins to render the new graph.

Graph with few hundred nodes. Any idea what could be going wrong/can be optimized?

balamurugan15 commented 6 months ago

Update: Came across this issue on d3-graphviz https://github.com/magjac/d3-graphviz/issues/232 that suggests the following config for d3-graphviz:

 d3.select('.graph')
                .graphviz()
                .tweenPaths(false)
                .tweenShapes(false)
                .growEnteringEdges(false)

I tried it locally and it worked! A request would be to expose these params to DashInteractiveGraphviz so it can be configures as required for meeting performance requirements.

Thanks!