Large operations in sync databases

Kent James kent at caspia.com
Tue Jul 13 15:46:18 UTC 2010


  On 7/13/2010 2:11 AM, Ben Bucksch wrote:
> Is there a very good reason to not use async? It's fairly easy to use
As Andrew said, the current backend design does not support "all async, 
all of the time" very well. In my unit tests I use Andrew's async 
framework with "yield false", and I'll probably try to use that in other 
js that I do for the main app eventually.

Also, the changes that I needed to do on my database were actually not 
very extensive. I split the original design into two files in a few 
hours of work without even needing to change the .idl file I use to 
access it (I'm a split C++/js app) - except for this large operations 
issue. I already had to split out queryable items from the datablob into 
separate sqlite columns, so it was not that hard to simply add them to a 
different parallel file instead. I suppose I am setting myself up for 
inconsistencies in the future though.

But there are always limits of what one does async versus sync. Imagine 
the pain if you needed async structures every time that you accessed a 
message property. Mork saves us here, but I still daydream of an 
sqlite-drive nsIMsgDBHdr.

rkent



More information about the tb-planning mailing list