W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2008

[whatwg] Moving openDatabase off the UI thread

From: Dimitri Glazkov <dimitri.glazkov@gmail.com>
Date: Thu, 10 Apr 2008 06:48:10 -0500
Message-ID: <fb15ac210804100448t213307b7x8ad78c8a5a35151a@mail.gmail.com>
In the current SQL storage spec
all database operations can be nicely tucked onto a separate thread,
so that they don't block the UI thread, except for one place:
openDatabase has to query version information and open or create the

This seems a bit out-of-sync (oh no, bad pun) with the rest of the
spec, where everything is asynchronous. Would it be more
logical/practical to explicitly (per spec) move the actual opening of
the database off the main thread? Like so:

Verifying database version and opening/creation of the database occurs
at pre-flight of the transaction, unless the database is already open.

Thus, no potential UI thread blockage by the database operations
during openDatabase invocation, as well as no need to raise the

What do you think?

Received on Thursday, 10 April 2008 04:48:10 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:01 UTC