You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Rob Sherman <Ro...@medicaltracking.com> on 2015/07/21 17:12:12 UTC

Huge performance gap between iOS SQLite and Android SQLite

Hello Cordova Dev's.
My company develops a mobile inventory/ERP client/scheduling/Logistics App for the medical industry.
We support iOS and Android (and possibly Windows Tablets soon)
We are seeing (as are many others) extreme differences in SQLite data load times between iOS and Android.
We have applied every optimization and tried nearly anything and everything on Stack overflow.

A data load (lets call it an initial data load) for a large client with a lot of data takes 1h 57s 342ms on Android
-the same code and same plug-in on iOS takes less than 0h 6m 112ms to do the same work. This is a radical difference, to be sure.
I understand the plug-in developer is likely a better contact on this, however;

  1.  In the enterprise market, which is growing fast, local DB can be considered a core competancy.
  2.  After applying every possible technique, including not transaction wrapping each insert-the gains are marginal.
  3.  This seems to indicate a platform difference better addressed centrally

We are "getting creative" in that we are trying locking preferences and even waiting to apply triggers until after init data load
-this is in development for POC and dev testing now but I haven't had result reports to review yet, so I can't detail the effectiveness, yet.

Any help/direction and/or action is sincerely appreciated-and by no means expected, I am guessing you are at least aware there is difference.
Hopefully my voice added to other might spur an organization wide discussion that leads to equality of SQLite performance across platforms as the very nature of Cordova and the HTML5/JavaScript components manage to do achieve parity.
Sincerely,
Rob Sherman, Mobile Architect, MTS


Re: Huge performance gap between iOS SQLite and Android SQLite

Posted by Carlos Santana <cs...@gmail.com>.
We use sqlcipher (based on SQLite) here in IBM have not heard horrors
stories.

Like Jesse said you could be running Android 1.6 :-) if you don't provide
something to replicate hard to tell also stackoverflow might provide wider
audience for help

Also hardware specs and if io type internal or SD card might also be
helpful

On Tue, Jul 21, 2015 at 7:15 PM Parashuram N <pa...@microsoft.com> wrote:

> It would also be interesting to see the SQLite plugin that you are using
> for this test.
>
> -----Original Message-----
> From: Jesse [mailto:purplecabbage@gmail.com]
> Sent: Tuesday, July 21, 2015 3:33 PM
> To: dev@cordova.apache.org
> Subject: Re: Huge performance gap between iOS SQLite and Android SQLite
>
> Please post a brief sample demonstrating the issue and someone will have a
> look.
> It is virtually impossible without even knowing what plugin you are using
> ....
> Gut reaction is the android code is doing something wrong, but it's hard
> to know with a concrete example.
>
>
>
> My team is hiring!
> @purplecabbage
> risingj.com
>
> On Tue, Jul 21, 2015 at 8:12 AM, Rob Sherman <
> Rob.Sherman@medicaltracking.com> wrote
> > Hello Cordova Dev's.
> > My company develops a mobile inventory/ERP client/scheduling/Logistics
> > App for the medical industry.
> > We support iOS and Android (and possibly Windows Tablets soon) We are
> > seeing (as are many others) extreme differences in SQLite data load
> > times between iOS and Android.
> > We have applied every optimization and tried nearly anything and
> > everything on Stack overflow.
> >
> > A data load (lets call it an initial data load) for a large client
> > with a lot of data takes 1h 57s 342ms on Android -the same code and
> > same plug-in on iOS takes less than 0h 6m 112ms to do the same work.
> > This is a radical difference, to be sure.
> > I understand the plug-in developer is likely a better contact on this,
> > however;
> >
> >   1.  In the enterprise market, which is growing fast, local DB can be
> > considered a core competancy.
> >   2.  After applying every possible technique, including not
> > transaction wrapping each insert-the gains are marginal.
> >   3.  This seems to indicate a platform difference better addressed
> > centrally
> >
> > We are "getting creative" in that we are trying locking preferences
> > and even waiting to apply triggers until after init data load -this is
> > in development for POC and dev testing now but I haven't had result
> > reports to review yet, so I can't detail the effectiveness, yet.
> >
> > Any help/direction and/or action is sincerely appreciated-and by no
> > means expected, I am guessing you are at least aware there is difference.
> > Hopefully my voice added to other might spur an organization wide
> > discussion that leads to equality of SQLite performance across
> > platforms as the very nature of Cordova and the HTML5/JavaScript
> > components manage to do achieve parity.
> > Sincerely,
> > Rob Sherman, Mobile Architect, MTS
> >
> >
>

RE: Huge performance gap between iOS SQLite and Android SQLite

Posted by Parashuram N <pa...@microsoft.com>.
It would also be interesting to see the SQLite plugin that you are using for this test. 

-----Original Message-----
From: Jesse [mailto:purplecabbage@gmail.com] 
Sent: Tuesday, July 21, 2015 3:33 PM
To: dev@cordova.apache.org
Subject: Re: Huge performance gap between iOS SQLite and Android SQLite

Please post a brief sample demonstrating the issue and someone will have a look.
It is virtually impossible without even knowing what plugin you are using ....
Gut reaction is the android code is doing something wrong, but it's hard to know with a concrete example.



My team is hiring!
@purplecabbage
risingj.com

On Tue, Jul 21, 2015 at 8:12 AM, Rob Sherman < Rob.Sherman@medicaltracking.com> wrote 
> Hello Cordova Dev's.
> My company develops a mobile inventory/ERP client/scheduling/Logistics 
> App for the medical industry.
> We support iOS and Android (and possibly Windows Tablets soon) We are 
> seeing (as are many others) extreme differences in SQLite data load 
> times between iOS and Android.
> We have applied every optimization and tried nearly anything and 
> everything on Stack overflow.
>
> A data load (lets call it an initial data load) for a large client 
> with a lot of data takes 1h 57s 342ms on Android -the same code and 
> same plug-in on iOS takes less than 0h 6m 112ms to do the same work. 
> This is a radical difference, to be sure.
> I understand the plug-in developer is likely a better contact on this, 
> however;
>
>   1.  In the enterprise market, which is growing fast, local DB can be 
> considered a core competancy.
>   2.  After applying every possible technique, including not 
> transaction wrapping each insert-the gains are marginal.
>   3.  This seems to indicate a platform difference better addressed 
> centrally
>
> We are "getting creative" in that we are trying locking preferences 
> and even waiting to apply triggers until after init data load -this is 
> in development for POC and dev testing now but I haven't had result 
> reports to review yet, so I can't detail the effectiveness, yet.
>
> Any help/direction and/or action is sincerely appreciated-and by no 
> means expected, I am guessing you are at least aware there is difference.
> Hopefully my voice added to other might spur an organization wide 
> discussion that leads to equality of SQLite performance across 
> platforms as the very nature of Cordova and the HTML5/JavaScript 
> components manage to do achieve parity.
> Sincerely,
> Rob Sherman, Mobile Architect, MTS
>
>

Re: Huge performance gap between iOS SQLite and Android SQLite

Posted by Jesse <pu...@gmail.com>.
Please post a brief sample demonstrating the issue and someone will have a
look.
It is virtually impossible without even knowing what plugin you are using
....
Gut reaction is the android code is doing something wrong, but it's hard to
know with a concrete example.



My team is hiring!
@purplecabbage
risingj.com

On Tue, Jul 21, 2015 at 8:12 AM, Rob Sherman <
Rob.Sherman@medicaltracking.com> wrote:

> Hello Cordova Dev's.
> My company develops a mobile inventory/ERP client/scheduling/Logistics App
> for the medical industry.
> We support iOS and Android (and possibly Windows Tablets soon)
> We are seeing (as are many others) extreme differences in SQLite data load
> times between iOS and Android.
> We have applied every optimization and tried nearly anything and
> everything on Stack overflow.
>
> A data load (lets call it an initial data load) for a large client with a
> lot of data takes 1h 57s 342ms on Android
> -the same code and same plug-in on iOS takes less than 0h 6m 112ms to do
> the same work. This is a radical difference, to be sure.
> I understand the plug-in developer is likely a better contact on this,
> however;
>
>   1.  In the enterprise market, which is growing fast, local DB can be
> considered a core competancy.
>   2.  After applying every possible technique, including not transaction
> wrapping each insert-the gains are marginal.
>   3.  This seems to indicate a platform difference better addressed
> centrally
>
> We are "getting creative" in that we are trying locking preferences and
> even waiting to apply triggers until after init data load
> -this is in development for POC and dev testing now but I haven't had
> result reports to review yet, so I can't detail the effectiveness, yet.
>
> Any help/direction and/or action is sincerely appreciated-and by no means
> expected, I am guessing you are at least aware there is difference.
> Hopefully my voice added to other might spur an organization wide
> discussion that leads to equality of SQLite performance across platforms as
> the very nature of Cordova and the HTML5/JavaScript components manage to do
> achieve parity.
> Sincerely,
> Rob Sherman, Mobile Architect, MTS
>
>