[whatwg] LocalStorage in workers

Robert O'Callahan robert at ocallahan.org
Wed Sep 16 16:36:00 PDT 2009


On Thu, Sep 17, 2009 at 11:17 AM, Jeremy Orlow <jorlow at chromium.org> wrote:

> The use cases all revolve around having a backend in a worker that handles
> offline and/or caching.  It could either feed its data to the page via
> messages or shared memory.  The former requires at least worker-only and the
> latter requires storage shared between the worker and the page.  The latter
> is technically an optimization, but I agree that it's a fairly major one.
>

I don't think copying data from a worker to a page through any kind of
database is going to outperform copying Javascript objects or even
serializing to strings and then deserializing. You don't even necessarily
need to copy all the JS objects passed from one thread to another if you're
willing to do some COW or other tricks.

Maybe I'm wrong, but at least it seems a premature optimization to declare
that shared database storage between page and worker is necessary for
performance.

Rob
-- 
"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
53:5-6]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090917/f1cb4fb1/attachment-0002.htm>


More information about the whatwg mailing list