Categories
Mozilla

Asynchronous Storage API Take 2

It’s been a bit more than three months since I wrote about the asynchronous storage API landing in mozilla-central. As far as I know, there are still no consumers of it in mozilla-central, but I do think that the Thunderbird folks are using it (they’ve been filing several bugs about it). We were looking at using it in places to help with the fsync issues we’ve been working with, and noticed a major flaw to the API. You cannot perform more than one statement at a time in a specific order asynchronously without jumping through a number of hoops that happen to also be on fire. Enter bug 458811. That landed on Monday, so now it’s easy to do – just call mozIStorageConnection::executeAsync and pass it an array of bound statements. Hope others find this just as useful as we did!

By Shawn Wilsher

The man behind the site.

One reply on “Asynchronous Storage API Take 2”

Hi Shawn, I just thought I’d let you know that the development version of my extension has just moved over to executeAsync in an attempt to get rid of a bit of the lag it causes doing its business.

It’s not got rid of it completely, but that’s mostly thanks to the Places code, not the other database stuff. :)

Thanks a lot for this.

Comments are closed.