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

A few questions to possibly improve performance and reliability #8

Open
dylans opened this issue Dec 5, 2023 · 1 comment
Open

Comments

@dylans
Copy link

dylans commented Dec 5, 2023

Impressive work, I'm still trying to make sense of some of the math and the approach, but this looks very promising after an initial review of the code, demos, and research paper.

A few questions:

  • Have you considered running force calculations in an offscreen canvas instance and/or maybe a worker? If so did you notice a further speedup in the time to calculate the forces?
  • Have you considered using something like GPU.js as a fallback mechanism for browsers and platforms that do not support WebGPU currently?
  • Have you considered collaborating with a project like Deck.gl to bring this approach to a larer ecosystem that has just started exploring moving from WebGL to WebGPU?
@ldyken53
Copy link
Collaborator

ldyken53 commented Dec 6, 2023

Thank you, appreciate the compliments, here are my thoughts:

  • We did experiment with running benchmarks with no onscreen canvas, but results were pretty much the same because the time to render to the canvas each frame is mostly negligible compared to the time to calculate forces. We did not experiment with using a worker, it would be interesting but the time taken doing work on the CPU is very small compared to the work of calculating forces or rendering large graphs on the GPU.
  • We hadn't really considered GPU.js, I'm sure someone could port this graph layout algorithm to use GPU.js, but it may lead to new limitations they have to consider since GPU.js uses WebGL2 as its backend, which doesn't have native support for some GPGPU functionalities like WebGPU does.
  • Considering bringing this approach to a larger ecosystem, the scope of this project was just to show the possibility of a WebGPU graph layout implementation for research purposes. It would be awesome if anyone wanted to use the code here to integrate GPU-powered graph layouts into a more mature library like Deck.gl, but sadly as a PhD student I don't really have time to lead the engineering effort required. The code is available to all though, if any developers are interested they have our full support :)

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

No branches or pull requests

2 participants