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

Support for WebWorker/OffscreenCanvas #299

Open
TimonLukas opened this issue Jan 3, 2023 · 0 comments
Open

Support for WebWorker/OffscreenCanvas #299

TimonLukas opened this issue Jan 3, 2023 · 0 comments

Comments

@TimonLukas
Copy link

Is your feature request related to a problem? Please describe.
Since the most performance intensive parts of the library on larger scales will be the Canvas parts, a lot of performance could be gained by moving those parts into a WebWorker rendering to an OffscreenCanvas. Especially any larger graphs which currently block the main thread would no longer cause the site itself to block.

Describe the solution you'd like
A new option while instantiating the graph object, which would either:

  • cause the library to spawn a WebWorker for the actual rendering, and transfer control to that (would have to spawn worker)
  • allow the user to supply an OffscreenCanvas as well as a message mechanism between WebWorker and main thread instances (would rely on user spawning worker)

Describe alternatives you've considered
/

Additional context
Since you probably don't want to proxy all events to the Web Worker, splitting the rendering would be the easier way, although it would require mirroring the node state.

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

1 participant