W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2009

[whatwg] LocalStorage in workers

From: Robert O'Callahan <robert@ocallahan.org>
Date: Thu, 17 Sep 2009 11:36:00 +1200
Message-ID: <11e306600909161636q68b7c4fey70d01a6867c98b4a@mail.gmail.com>
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.htm>
Received on Wednesday, 16 September 2009 16:36:00 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:52 UTC