Skip to content
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

Long render times for large datasets #41

Closed
tudorbertiean opened this issue Oct 17, 2017 · 9 comments
Closed

Long render times for large datasets #41

tudorbertiean opened this issue Oct 17, 2017 · 9 comments

Comments

@tudorbertiean
Copy link

tudorbertiean commented Oct 17, 2017

Is there any work around for the long rendering time for large datasets? I have approximately 500 nodes and the rendering freezes the page for about 1 minute until finally displayed.

Also occurs when using your data from 'json-example.json'.

@bkrem
Copy link
Owner

bkrem commented Oct 18, 2017

Hey @tudorbertiean,

Thanks for reminding me of this and apologies for the bottleneck. I'm currently working on a few performance improvements for large graphs to avoid blocking the main render thread for long periods of time.
Will hopefully have a release soon that includes some improvements for your use case.

Seen some significant speed ups with the JSON example you mentioned, would be great to have your tree to test with if it's not private/confidential info :)

@bkrem bkrem added this to the v1.6.0 milestone Oct 18, 2017
@tudorbertiean
Copy link
Author

tudorbertiean commented Oct 19, 2017

Thanks for the response, I will attach the json file but modified the data for testing purposes.

Keep up the good work!

hierarchy.zip

@bkrem
Copy link
Owner

bkrem commented Oct 20, 2017

Awesome, thank you for this! It's super useful to have a large dataset that approximates a real world use case for someone.

I'll be pushing a release tomorrow or Sunday at the latest that should improve performance a lot for large graphs 👍

@RohanDamani
Copy link
Contributor

+1

I'm trying to render 10+ trees at once with different data sets and it crashes the browser

thanks for actively maintaining this project!!

@bkrem
Copy link
Owner

bkrem commented Oct 20, 2017

@RohanDamani Damn sorry about that, this should get a lot more stable this weekend.

bkrem added a commit that referenced this issue Oct 21, 2017
* Adds `shouldNodeTransform` check + test

* Turns `setTransformOrientation` into pure func

* Turns `applyTransform` into pure func

* Avoids unnecessary d3 .transition() calls
@bkrem bkrem removed this from the v1.6.0 milestone Oct 21, 2017
@bkrem
Copy link
Owner

bkrem commented Oct 21, 2017

@tudorbertiean @RohanDamani

Released this as v1.5.1 just now so closing the issue. Please check the release notes, update and let me know in a new issue if something is wrong :)

The major bottleneck seems to lie with D3's select().transition() which blows up the browser's call stack whenever all the nodes in a large graph are mounted/unmounted at once (i.e. on initial load, collapsing to the root node).

I'll see what can be done to throttle/debounce the calls to still be able to use transitions on very large graphs while keeping responsiveness. Suggestions/contributions always welcome!

@bkrem bkrem closed this as completed Oct 21, 2017
@RohanDamani
Copy link
Contributor

@bkrem much better thanks!

@jameerjbr
Copy link

Hey @bkrem

I am using larger data tree render take more time and zoom also problem please fix it.
i will attached my code for testing purpose
tree.zip

@tsamawi
Copy link

tsamawi commented Jan 27, 2020

@tudorbertiean @RohanDamani

Released this as v1.5.1 just now so closing the issue. Please check the release notes, update and let me know in a new issue if something is wrong :)

The major bottleneck seems to lie with D3's select().transition() which blows up the browser's call stack whenever all the nodes in a large graph are mounted/unmounted at once (i.e. on initial load, collapsing to the root node).

I'll see what can be done to throttle/debounce the calls to still be able to use transitions on very large graphs while keeping responsiveness. Suggestions/contributions always welcome!

Has this been implemented?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants