W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2011

Re: LocalStorage inside Worker

From: Keean Schupke <keean@fry-it.com>
Date: Fri, 7 Jan 2011 10:39:01 +0000
Message-ID: <AANLkTinOYG-GqOztjKpzot3rNk+RjEnz9Nz_KPVC2LWU@mail.gmail.com>
To: Felix Halim <felix.halim@gmail.com>
Cc: Jonas Sicking <jonas@sicking.cc>, Jeremy Orlow <jorlow@chromium.org>, public-webapps WG <public-webapps@w3.org>
>
>
> Ok. But what i'm trying to say is, forcing the localStorage to use
> "atomic" block is a bad idea in the main page thread since a
> transaction in the main page thread can span very long time perhaps
> committed by a click event.


How is this any different from having a big loop an any callback:

var onclick = fuction() {
   for (i = 0; i < 1000000000; i++) {
       // do some work
   }
}

I've just made the page non-responsive...

Also notice:

atomic(function(state) {...})

The commit happens automatically when the callback function returns, so a
split transaction (the commit in a callback) is impossible with this
formulation. Just think about the lexical-scoping.


Cheers,
Keean.
Received on Friday, 7 January 2011 10:39:41 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:42 GMT