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

[IndexedDB] Synchronous access to object stores

From: João Eiras <joaoe@opera.com>
Date: Mon, 26 Mar 2012 14:07:52 +0200
To: "public-webapps@w3.org" <public-webapps@w3.org>
Message-ID: <op.wbr1bewd2q99of@joaoe>

Hi.

After a open database request, going from the IDBDatabase to the  
IDBObjectStore's properties is synchronous, which means that either all  
the metadata for every object store has to be preloaded, or that the  
ecmascript engine needs to wait (therefore blocking the page) while the  
request is done in the background.
The first issue raises the question: what if there are 10 000 object  
stores ? Preloading everything is overkill. The second issues raises  
another question: blocking for file IO ?

var r = indexedDb.open('foo');
r.onsuccess = function(){
   r.transaction('o').objectStore('o').indexNames;
}

Supporting this is a trivial implementation detail, but the spec has the  
issue nonetheless.
Received on Monday, 26 March 2012 12:08:24 GMT

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