Re:Greenlet – Move an async function into its own thread in ...
by developit on Monday January 29, 2018 @10:53AM
(#16258165)
It's true, the example could be better. However - adding any form of data pruning to the example would immediately show the benefit. JSON parsing happens in the worker, and only a small subset of data is actually serialized and sent back to the main thread.
[ Parent
| on HN ]
Re:Greenlet – Move an async function into its own thread in ...
by Klathmon on Monday January 29, 2018 @11:07AM
(#16258247)
Yeah, that would be a great way of handling it. The other would be to parse out the data and insert it into the IndexedDB and then in the main thread only pull out what is needed
(I had to do exactly that for a B2B app that was receiving hundreds of MB of data a while back)