Any possibility in future to some D3 work to a web worker?

34 views
Skip to first unread message

dock me

unread,
Jun 1, 2015, 4:00:46 AM6/1/15
to d3...@googlegroups.com

I know D3 needs access to the DOM. Might there be some techniques available where some of the grunt work could be sent to a web worker?

I am attempting to load a large amount of data. With a web worked it would be possible to cancel excessively long tasks. Of course, this is not possible as D3 requires access to the DOM. However, might there be a possibility to load a sub-set of the D3 library into a web worker?

nick

unread,
Jun 1, 2015, 10:33:18 AM6/1/15
to d3...@googlegroups.com
Here's a little thing I put together (ended up being short enough for a gist):
http://bl.ocks.org/bollwyvl/b34ffe2f40d64f3aae0f

Because of the asynchrony, it's not a good fit for d3 right now, but you can do anything you want inside the worker: some useful cases might be loading up a big data set, or performing an expensive calculation.

The data passed back out could then drive DOM manipulation.
Reply all
Reply to author
Forward
0 new messages