improve speed from sqlite !!

Hi there,
i made right now a test and was surprised about the 'low' speed from the sqlite commands.

4200 sql inserts does need
- on my native coded android app 15 seconds seconds..
- corona app on corona simulator 10 seconds (on a MBA 2.13Ghz Core Duo)
- corona app on my iPhone 4 i waited around 4 Minutes !!

is there any change in the near future you will improve the sqlite speed?
especially as more and more devs not only make games .. instead also
serious applications the need for a fast sqlite system is very important.

thx
chris

I would think this is probably related to hardware. On your "native coded android app" that takes 15 seconds, are you running this on a device or a simulator on a PC?

for sure its related to hardware.

the test app i made as a native app (eclipse, adt) and tested on a nexus one (thats kind a midrange android device) 15 seconds as mentioned.

so the same amount of sqlite commands "create new row or insert" by corona on an iPhone 4
does need 4 minutes is really a huge different.

right now i placed the same corona app (that needs 4 mins on iphone4) on my nexus one;
result after a few seconds i get already "sorry! activity is not responding" i had to click 10 times "WAIT" till its done.

also here it looks there needs really some urgent optimizing.
its just a loop with "Insert " into sqlite.

surprising the nexus one just did need 3 Minutes. still a lot of time, but 25% faster than the iPhone 4. From the Processor I guess the iPhone4 should be better than the nexus one... or the sqlite interface is better coded for android :)

cheers
chris

We are planning to use sqlite to store game data, glad we look at this thread, so we should avoid inserting many data at once using corona's sqlite :)

@guruk have you solved the slowness?

hi,

not now, i am working on it... till now i work on several constructions where some speed improvements are needed. to understand me right... corona is great and amazing fast for many things (sprites etc.) as its specialized on games.

for the basic things sqlite as it is now, should be ok, but in the moment a lot of data is needed or fast access to the database, then soon there is a limit. I really hope soon there is an improvement.

if you do not have so much game data it should be fine.

just in my case i work with a calendar, each day can hold up to 8 fields
so i have to make test lets say with 3 years = 8* 30 days * 360 days * 3 years = 259200 records i have to access fast, as i do calculations that can process over years.

in here while switching from one month to another a simple select * from xxxx where day > yyy
can already have an effect how fast the user can switch months.

you may do your own tests, as mentioned as long its not as much data, it should be fine :)
but i guess we are a looking in longterm that we also can handle bigger databases.

greets
chris

views:1676 update:2011/9/25 12:40:18
corona forums © 2003-2011