[dojo-contributors] Gears/Storage performance issues

Brad Neuberg paperairplane at gmail.com
Thu Aug 9 15:45:15 EDT 2007


Hi Adam. In terms of the performance issues for Dojo SQL, this is
because every call to dojox.sql causes an automatic database
open/close to happen to make it easier for developers. It is
recommended that if you are doing a tight FOR loop like in that
example that you point to that you manually open and close the
database yourself; Dojo SQL will automatically see that you are taking
things over and won't manage until you reclose it:

dojox.sql.open();
for(var i = 0; i < 1000; i++){
   dojox.sql(/* Some SQL Statement in a loop */);
}
dojox.sql.close();

For the performance issues for Flash, doing a bunch of
dojox.storage.puts() is indeed an issue. One workaround is to simply
save them all onto a single JavaScript object, and then do a
dojox.storage.put on to that so you only have one call.

I have moved away from primary maintenence of Dojo Flash Storage to
focus on Dojo Offline using Google Gears and do not have the bandwidth
to address issues related to it. If you have a proposal on how to
modify the Dojo Storage put/get API for bulk puts and gets, and then
craft a good patch to the Flash storage provider for 0.9 I would
incorprate it if it looks clean enough in terms of the API. In general
though I am looking for a new person to maintain patch management of
Flash based storage in 0.9.

Best,
  Brad

On 7/20/07, Adam L. Peller <adam at peller.org> wrote:
> Hi Brad and Dylan.  Could I ask you to take a look at this thread:
>
> http://www.nabble.com/Dojo-Offline-and-SQLite-performance-tf4082361.html#a11713875
>
> There are continued requests for bulk getters and setters to overcome
> a perceived performance problem.  For Flash, the issue is crossing the
> native boundary.  In the case of SQL, it was suggested that database
> open/close might be incurred for individual hits.
>
> Some of Julian's patches are getting stale in trac.  Since this could
> impact the APIs, it would be great to deal with this "SRTL".
>
> Thanks,
> Adam
>



More information about the dojo-contributors mailing list