-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Move math portion of forceAtlas plugin to a WebWorker #149
Comments
Agreed. If I understand well, But what to do where the Transferables are not supported to deal with data? |
Which browser supports WebGL but not transferables? ;-) Transferables seem to be well-supported... hmm... after looking online, it looks like IE11 doesn't support it yet. Damned...
I'm not sure I understand this part. In any case, in my experience using d3, if you just move a node I need to release a first version of OoI and after that, I'll be experimenting with moving FA2 math to a WebWorker with transferables (or feature detection and fallback for IE11). I'll report my progress here obviously. |
The suggested idea was to use Web Workers to continuously update the nodes position BUT to transfer from time to time the new positions + animating the movements with transitions. The goal is to reduce the costs of the data transfer and the update computations. Which is basically what you explained as
|
This has been solved quite a long time ago since we have an efficient FA2 web worker now :) |
Resonates with this d3 issue.
ForceAtlas is a math-intensive algorithm. The whole point of it is gradually updating the screen so the user see the graph shaping (initially and when the graph is changed) and can interact with the graph before it's fully positioned. JavaScript in the browser is single-threaded so the math and the graphic rendering compete for the CPU.
The idea of this issue is moving the math away from the screen to a WebWorker. The math will be done in parallel in the WebWorker which will send updates to the main thread to update graphics.
Transferables enables quick message passing.
The text was updated successfully, but these errors were encountered: