[whatwg] SQL section feedback

Brady Eidson beidson at apple.com
Wed May 7 10:53:10 PDT 2008


On May 6, 2008, at 10:14 PM, Ian Hickson wrote:

>
> On Thu, 10 Apr 2008, Dimitri Glazkov wrote:
>>
>> In the current SQL storage spec
>> (http://www.whatwg.org/specs/web-apps/current-work/multipage/section-sql.html 
>> ),
>> 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 database.
>>
>> 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
>> INVALID_STATE_ERR exception.
>>
>> What do you think?
>
> This seems like something that UAs could optimise -- knowing what
> databases and what version each origin has seems similar to having
> immediate access to name/value pairs and to cookies, both of which are
> already synchronous. And making it use a callback would make this even
> less usable. :-)
>
> What do other vendors think? Anyone?

I agree with Hixie and disagree with the need to make this  
asynchronous.  WebKit already optimizes as Hixie suggests, to a  
reasonable degree.

~Brady



More information about the whatwg mailing list