d3-cloud
d3-cloud copied to clipboard
Run from web worker
The d3
dependent library has achieved to run without DOM from within a web worker.
However, d3-cloud
still requires to run in the main browser thread, blocking UI responsiveness for large cloud elaborations.
At least this is what it appears to me. I get a "ReferenceError: Canvas is not defined
" running from a web worker.
Is it possible to solve this, or are there workarounds?
Interesting idea. The part that draws and retrieves text won’t work inside a Web Worker. The current algorithm requires each word to be placed serially, but perhaps an alternative parallel algorithm could be used instead.
OffScreen canvas support is available in chrome, and coming to other browsers https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas
OffScreen canvas = webworker
@Bnaya Thanks for your suggestion