
Just a quick note on SQLite in AIR and slow writes: using transactions will speed up multiple inserts/updates.
haven’t had a chance to do any performance tuning or testing when using SQLite in AIR. But just today I finished writing some tests for writing some stuff into a SQL db and noticed that the writes were slow. I created a little benchmark test project that wrote 55 records total over two tables with a total of 4 columns of NUMERIC type for each table … nothing fancy. This is obviously not a thorough analysis and just something quick and dirty, but just writing those 55 records took almost 30 seconds on average. That’s way too slow. Specially since I am not using any of the async methods, such a slow write speed will lock up your Flex interface.
Once I wrapped the saves in one transaction the speed went down to an average .4 seconds because the data is committed in one big chunk when you call commit.
There may be other ways to increase the speed. I’ll have to investigate this later. .4 seconds will probably still be too noticeable a hiccup on the interface so I’ll be changing my data store to use async methods.
Just thought I’d put it out there.
Also, if you have an table with an INTEGER PRIMARY KEY AUTOINCREMENT and you keep getting an error that says “Unable to convert Text value to Numeric value” or something to that effect make sure you’ve upgraded to the engineering drop of FB3 from January 14th, 2008. Apparently that’s a bug in the version before that, but I didn’t find it on the Adobe bug db.