I'm testing my app on some devices and facing serious speed problems on a Iphone4.
Look to this code:
Running in release mode on a Iphone6S this requires just 20mS. No problem.
Running in release on a Iphone4 this requires about 10 seconds ...
Consider that ExecQuery is executed in less than 1mS and the ResultSet contains 10 records.
What takes a so long time is the Do-While loop. Ten iterations, 1 second each ....
Is an Iphone 6S 10.000/20=500 times faster than a Iphone4 ?
Look to this code:
B4X:
Dim rs As ResultSet=SQL_db1.ExecQuery("SELECT * FROM records tmp GROUP BY ID ORDER BY GDate DESC")
Dim nn As Int=0
Do While rs.NextRow
nn=nn+1
Loop
Running in release mode on a Iphone6S this requires just 20mS. No problem.
Running in release on a Iphone4 this requires about 10 seconds ...
Consider that ExecQuery is executed in less than 1mS and the ResultSet contains 10 records.
What takes a so long time is the Do-While loop. Ten iterations, 1 second each ....
Is an Iphone 6S 10.000/20=500 times faster than a Iphone4 ?