SQL execution is the same speed. I guess that in LoadSQLiteDB you are creating many rows. You can pause the execution to see where it spends most of the time.
Like I say, it's only 9 rows and it was fine before - something is way slower with the new rapid debug.
I agree that the SQL execution is not the problem but it seems that all the routines internal to the Table object that use loops, are slow (I doubt it's specific to the Table object)
eg. in Table.innerClearAll, the loop below takes forever (it is a nested loop, not sure if that's a factor)
For i = 1 To 80 'fill the cache to avoid delay on the first touch
LabelsCache.Add(CreateNewLabels)
Next
Perhaps the Table author can verify what I'm seeing
The Table creates an internal cache when it is created. Testing it with beta #4 it takes 2-3 seconds to create a Table and add 50 rows. Are you testing it with a real device or the emulator?
I am using a real device, the slowdown I experience is with beta#3 - I downloaded the link right now but still seem to have beta#3, is beta#4 available for download?
It's the same project I uploaded earlier but now this problem depends on data which come from a backend system. I'll try knock up a test app that shows the issue.
Clearing the table class is a heavy operation. In your code you are clearing it twice as LoadSQLiteDB clears it again.
With this code, tested with beta #5 (which is not yet available) it takes 8 seconds to load.
B4X:
Sub btnRun_Click
ProgressDialogShow("Running")
Try
Dim s As Long = DateTime.Now
tbl.LoadSQLiteDB(sql1, "select * from data", True)
Log(DateTime.Now - s)
Catch
ProgressDialogHide
Msgbox(LastException.Message, "Error")
End Try
ProgressDialogHide
End Sub
It was helpful as there was an optimization that was not working properly. This is fixed for beta #5
The rapid debugger is slower compared to standard execution. There are cases where you should use the legacy debugger instead.
With that said I'm sure that with future versions of Basic4android it will become faster...