Sqlite and performances in LiveCode
Kay C Lan
lan.kc.macmail at gmail.com
Mon Mar 5 01:22:52 EST 2012
No, it's not the same one.
Looking at the SQLabs site, SQLabs "developed from scratch a brand new
ListBox that is able to display an infinite number of rows and columns in
just few milliseconds. This is a fundamental base control for the app."
They've been optemising their product since 2003, it would be surprising if
you can match them on your first try.
I did a few tests with FireFox's SQLite Manager and for 50,000 records
(11MB) it took 504ms to display in a field that could display ALL records.
Testing with LC I could extract the same records in 409ms but to display
them all in a field took it out to 917ms. By reducing the number of records
displayed to the size of the field, it took 410ms. Clearly LC fields are
the limiting factor here.
I then noticed that in FireFox, although all the rows could be scrolled
down to the bottom, the columns were all truncated. So I then changed my LC
field to a 'Basic table object', set the 'Maximum editable columns' to
match exactly the number of columns I had, and then set the tab stops so
only a small portion of data of each column was displayed - similar to how
FireFox truncated it's columns. In this way I was able to display ALL the
rows in 491 ms.
This may not be as fast as SQLabs, but I think they maybe the speed kings.
Compared to another SQLite tool I was able to get LC to perform just as
fast, if not a little faster.
HTH
On Sun, Mar 4, 2012 at 7:12 PM, Jérôme Rosat <jrosat at mac.com> wrote:
> I don't know if SQLiteManager for Firefox is the same one I use (from
> SQLabs) but it display all the records in one time (I can scroll all the
> list).
>
> But thank you for the suggestion, If necessary I'm going to display only a
> part of the records with a next button, even if I don't like very much this
> approach.
>
>
> Le 4 mars 2012 à 03:37, Kay C Lan a écrit :
>
>
> > If the 'SQLiteManager' you refer to is the same one I use with FireFox,
> in
> > my case it only displays 100 records at a time, you have to click the
> Next
> > button to see more - so this is a performance trick you can do with LC.
> > Instead of extracting 150000 records in one go, and displaying it in a
> > field in one go( which will take a long time) only extract 100 records
> > (which will take significantly less time) and have a Next button, just
> like
> > SQLIte Manager, to retrieve the next 100 records.
> >
> > If I'm right, the the fact that LC only took 4.4 times longer to display
> > 1500 times more records would suggest that you'll be able to do a lot
> > better with LC
> >
> > HTH
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
More information about the use-livecode
mailing list