danielcaldas / react-d3-graph

Interactive and configurable graphs with react and d3 effortlessly
https://danielcaldas.github.io/react-d3-graph/sandbox/
MIT License
819 stars 233 forks source link

Huge performance issue with rendering of Graph component. #450

Open onlyreddy opened 3 years ago

onlyreddy commented 3 years ago

Hi,

I created a custom node with a view generator and able to render it. Tired to check the no of times the custom node is loading with React devtools of profiler tab. I wondered after seeing the numbers and it's a big one.

Then I cloned your master branch and checked the same in development mode. Their also same problem occurred. Please refer to the below screenshot. It renders 206 times and with this facing lot of delay while nodes are loading.

Can you please check this once?

image

antoninklopp commented 3 years ago

Hi @onlyreddy ,

I am not sure how to check this. Performance is always a very hard question and we are relying a lot on react and d3 here.

By looking at the code, do you have any suggestion to improve the performance ? I have the impression that react-d3-graph is not creating any heavy calculation or useless renderings but there might be some problems of course.

I will be very happy to here any possible improvements.