Re: Sqlite and performances in LiveCode

2012-03-15 Thread Pete
Thanks Trevor, I found the problem. I had a set dgText to empty in there, forgetting that dgText doesn't exist in these circumstances. Changed that to se the dgNumberOfRecords to zero and all works fine now. Pete On Thu, Mar 15, 2012 at 4:55 AM, Trevor DeVore wrote: > On Wed, Mar 14, 2012 at 9:

Re: Sqlite and performances in LiveCode

2012-03-15 Thread Trevor DeVore
On Wed, Mar 14, 2012 at 9:35 PM, Pete wrote: > > I'm using the datagrid in question as a general purpose viewer of data from > any table in an sqlite database. The circumstances that cause the problem > are if I have data from a table displayed, then I filter it in some way, so > the number and

Re: Sqlite and performances in LiveCode

2012-03-14 Thread Pete
Hi Trevor, Sorry to keep coming up with new quirks but I have another strange situation regarding GetDataForLine. Under some circumstances, the data that I supply from GetDataForLine ends up in the datagrid starting at the 13th line instead of line 1 and the first 12 lines have data in them from t

Re: Sqlite and performances in LiveCode

2012-03-14 Thread Bob Sneidar
AMEN Trevor! Bob On Mar 14, 2012, at 7:05 AM, Trevor DeVore wrote: > There really is room for a data grid-like control that is really just a > view and does nothing more than display data that is fed to it from a data > source. > > Regards, > > -- > Trevor DeVore __

Re: Sqlite and performances in LiveCode

2012-03-14 Thread Trevor DeVore
On Tue, Mar 13, 2012 at 5:46 PM, Pete wrote: > OK, found the problem. I had a set dgProps["sort by column"] statement > after setting the dgNUmberOfRecords. Moved that to a place where > dgNumberOfRecords is zero and only one cycle of GetDataForLine happens now. > Great. Just remember that any

Re: Sqlite and performances in LiveCode

2012-03-13 Thread Pete
Hi Trevor, OK, found the problem. I had a set dgProps["sort by column"] statement after setting the dgNUmberOfRecords. Moved that to a place where dgNumberOfRecords is zero and only one cycle of GetDataForLine happens now. Thanks for the help in tracking it down. There are a lot of nuances to u

Re: Sqlite and performances in LiveCode

2012-03-13 Thread Jérôme Rosat
Thank you very much Trevor. On my iMac 2.8 GHz Intel Core 2 Duo with LiveCode 5.0.2: Opening movies cursor took 274 milliseconds --- Drawing list took 126 milliseconds --- Really impressive compared to previous results ! Jérôme Le 12 mars 2012 à 15:01, Trevor DeVore a écrit : > > I'v

Re: Sqlite and performances in LiveCode

2012-03-13 Thread Trevor DeVore
On Mon, Mar 12, 2012 at 8:17 PM, Pete wrote: > Thanks for making that change. > > I've been following up a bit more on the behavior of GetDataForLine being > called in repeated cycles for the number of lines in the datagrid. As a > reminder, the datagrid has 11 visible lines, GetDataForLine gets

Re: Sqlite and performances in LiveCode

2012-03-12 Thread Pete
Correction of type! Both instances of 1-2 should read 1-12, sorry. Pete On Mon, Mar 12, 2012 at 5:17 PM, Pete wrote: > GetDataForLine gets called once for lines 1-12, then a second time for > lines 1-2 again, and occasionally a third time for lines 1-2. -- Pete Molly's Revenge

Re: Sqlite and performances in LiveCode

2012-03-12 Thread Pete
Hi Trevor, Thanks for making that change. I've been following up a bit more on the behavior of GetDataForLine being called in repeated cycles for the number of lines in the datagrid. As a reminder, the datagrid has 11 visible lines, GetDataForLine gets called once for lines 1-12, then a second ti

Re: Sqlite and performances in LiveCode

2012-03-12 Thread Trevor DeVore
On Thu, Mar 8, 2012 at 2:47 PM, Jérôme Rosat wrote: > Trevor, yes I'm going to try. > > But I think it would be a good idea if you could change your stack in the > lesson "Displaying Large Amounts of Data" to demonstrate the performance of > LiveCode. > I've updated the stack to use the new tech

Re: Sqlite and performances in LiveCode

2012-03-08 Thread Web Admin Himalayan Academy
On 3/5/12 12:53 PM, � wrote: Your "acid test" is very interesting. Using sqlite3 directly is one solution to increase performance of LiveCode. And you're right, a response time of less than a second is acceptable from a user's perspective and and limit the number of registration is a way to re

Re: Sqlite and performances in LiveCode

2012-03-08 Thread Jérôme Rosat
Trevor, yes I'm going to try. But I think it would be a good idea if you could change your stack in the lesson "Displaying Large Amounts of Data" to demonstrate the performance of LiveCode. Jérôme Le 8 mars 2012 à 05:19, Trevor DeVore a écrit : > Jérôme - you might try something like this in

Re: Sqlite and performances in LiveCode

2012-03-08 Thread Pete
Hi Trevor, The properties you mentioned are both set correctly. I tried logging executioncontexts but everything looked exactly the same each time though. I also logged the line number parameter of GetDataForLine each time through and displayed them immediatly after the line of code that sets dgn

Re: Sqlite and performances in LiveCode

2012-03-08 Thread Trevor DeVore
On Thu, Mar 8, 2012 at 1:16 AM, Pete wrote: > Hi Trevor, > I tried this approach in Livecode an it works great. > > I do have one strange thing going on which I hope you can help with. There > are 12 lines in my datagird. I put a breakpoint in GetDataForLine and I > see it being called 12 times

Re: Sqlite and performances in LiveCode

2012-03-07 Thread Pete
Hi Trevor, I tried this approach in Livecode an it works great. I do have one strange thing going on which I hope you can help with. There are 12 lines in my datagird. I put a breakpoint in GetDataForLine and I see it being called 12 times followed by a slight pause, then it's called another 12

Re: Sqlite and performances in LiveCode

2012-03-07 Thread Trevor DeVore
On Wed, Mar 7, 2012 at 11:37 AM, Pete wrote: > I emailed sqlitemanager support re the manage/sql tab performance > difference. Mystery solved by the reply: > > "In the Manage panel when you see SELECT * FROM table the real query > executed is SELECT rowid FROM table and then a SELECT * FROM table

Re: Sqlite and performances in LiveCode

2012-03-07 Thread Jérôme Rosat
Thank you Pete for that clarification. Jérôme Le 7 mars 2012 à 17:37, Pete a écrit : > I emailed sqlitemanager support re the manage/sql tab performance > difference. Mystery solved by the reply: > > "In the Manage panel when you see SELECT * FROM table the real query > executed is SELECT rowi

Re: Sqlite and performances in LiveCode

2012-03-07 Thread Pete
I emailed sqlitemanager support re the manage/sql tab performance difference. Mystery solved by the reply: "In the Manage panel when you see SELECT * FROM table the real query executed is SELECT rowid FROM table and then a SELECT * FROM table WHERE rowid=N is execute for each visible row of the li

Re: Sqlite and performances in LiveCode

2012-03-06 Thread Pete
I just noticed that the same vendor that makes SQLiteManager also makes an SQLite server package (cubeSQL) that does implement MVCC. But you're right, it's definitely not there in standard SQLite. An SQLite server sounds interesting though. Pete On Tue, Mar 6, 2012 at 11:35 AM, Bernard Devlin wr

Re: Sqlite and performances in LiveCode

2012-03-06 Thread Bernard Devlin
I notice from things discussed on the Valentina list that they recommend using API methods rather than SQL calls, because the former will be faster due to less overhead. So these different ways of interacting with a sqlite database might well represent an application using the sqlite API. Althoug

Re: Sqlite and performances in LiveCode

2012-03-06 Thread Pete
I got the same results on the movies database and even more pronounced differences on a table in one of my own databases with ~48k records in it: SQL tab 0.519secs, Manage tab 0.045 secs, more than a 10-fold difference! Just a straight SELECT * in each case. Pete On Tue, Mar 6, 2012 at 4:56 AM, T

Re: Sqlite and performances in LiveCode

2012-03-06 Thread Trevor DeVore
On Tue, Mar 6, 2012 at 6:02 AM, Bernard Devlin wrote: > The difference might be explained due to Livecode setting a smaller > cache size than other applications. > > http://web.utk.edu/~jplyon/sqlite/SQLite_optimization_FAQ.html > http://www.sqlite.org/pragma.html#pragma_cache_size > > I don't kn

Re: Sqlite and performances in LiveCode

2012-03-06 Thread Trevor DeVore
On Tue, Mar 6, 2012 at 1:28 AM, Pete wrote: > I'm pretty sure that LC 5.0 included a more recent version of the sqlite > library so there could be some performance improvements there. In 5.0.2 the SQLite version is 3.7.4 but it has no affect on the speed. To check the version of SQLite that is

Re: Sqlite and performances in LiveCode

2012-03-06 Thread Bernard Devlin
The difference might be explained due to Livecode setting a smaller cache size than other applications. http://web.utk.edu/~jplyon/sqlite/SQLite_optimization_FAQ.html http://www.sqlite.org/pragma.html#pragma_cache_size I don't know if the cache size is under one's control with sqlite. I know it

Re: Sqlite and performances in LiveCode

2012-03-05 Thread Pete
Hi Trevor, I'm pretty sure that LC 5.0 included a more recent version of the sqlite library so there could be some performance improvements there. I don't know how to find out what version they are using but the current sqlite library version is 3.7.10, released in January this year so it's probab

Re: Sqlite and performances in LiveCode

2012-03-05 Thread Trevor DeVore
On Mon, Mar 5, 2012 at 11:22 PM, Trevor DeVore wrote: > > Your data grid has been set up correctly. I get rendering times of 120 > milliseconds on average so it isn't the bottle neck you need to be > concerned with at the moment. > I just realized that was the example stack from the lesson you re

Re: Sqlite and performances in LiveCode

2012-03-05 Thread Trevor DeVore
On Mon, Mar 5, 2012 at 6:09 PM, Jérôme Rosat wrote: > I use the stack provided here: > http://www.bluemangolearning.com/download/revolution/tools/datagrid_databases.zip > > I don't know if I understand your question, but the code is: > >put the milliseconds into theStart >put revQueryData

Re: Sqlite and performances in LiveCode

2012-03-05 Thread Jérôme Rosat
Trevor, I use the stack provided here: http://www.bluemangolearning.com/download/revolution/tools/datagrid_databases.zip I don't know if I understand your question, but the code is: put the milliseconds into theStart put revQueryDatabase(sConnID,"SELECT * FROM movies") into sCursorID

Re: Sqlite and performances in LiveCode

2012-03-05 Thread Jérôme Rosat
Your "acid test" is very interesting. Using sqlite3 directly is one solution to increase performance of LiveCode. And you're right, a response time of less than a second is acceptable from a user's perspective and and limit the number of registration is a way to reach this "performance". Le 5

Re: Sqlite and performances in LiveCode

2012-03-05 Thread Jérôme Rosat
Thank you Kay for your feedback. I didn't realize that SQLiteManager was "the King of the speed" and I am reassured to see that LiveCode is not so slow compared to other tools. Le 5 mars 2012 à 07:22, Kay C Lan a écrit : > No, it's not the same one. > > Looking at the SQLabs site, SQLabs "deve

Re: Sqlite and performances in LiveCode

2012-03-05 Thread Pete
Hi Bernard, Sorry to hear about Eric and ListMagic. I'm certainly not knocking the datagrid, it was a great addition to the Livecode arsenal of controls, no doubt about that. I have used both dgText and dgData and have not noticed a significant difference in performance which, as you say, is cont

Re: Sqlite and performances in LiveCode

2012-03-05 Thread Malte Brill
*Fetches Popcorn and takes a seat* Now I am curious how quickly this will be at the end. :-) Malte Trevor wrote: > > What are the exact calls you make in LiveCode during the 932 milliseconds? ___ use-livecode mailing list use-livecode@lists.runrev.c

Re: Sqlite and performances in LiveCode

2012-03-05 Thread Trevor DeVore
On Sat, Mar 3, 2012 at 6:00 PM, Jérôme Rosat wrote: > > This database contains approximately 150,000 records and it increases by > about 5,000 records per month. > > Before beginning, I read the lesson "Displaying Large Amounts of Data" on > the site of RunRev and I did tests with the sample stac

Re: Sqlite and performances in LiveCode

2012-03-05 Thread Bernard Devlin
There was such a datagrid-lite control a few years back, produced by Eric Chatonet. Sadly Eric died, and ListMagic appears to no longer be maintained. It used the basic field object, and well, it did some quite magical things with it. I think ListMagic stopped working with some changes introduce

Fwd: Sqlite and performances in LiveCode

2012-03-05 Thread Pete
Apologies Stephen and Scott for confusing you! I meant Stephen! Pete -- Forwarded message -- From: Pete Date: Mon, Mar 5, 2012 at 10:25 AM Subject: Re: Sqlite and performances in LiveCode To: How to use LiveCode Scott: I agree with you - datagrids are powerful, complex

Re: Sqlite and performances in LiveCode

2012-03-05 Thread Pete
Scott: I agree with you - datagrids are powerful, complex structures and come with a cost. They're a great tool for sure and I use them a lot when I need their functionality, especially if I need to include option menus, checkboxes, or any other column customizations. But I'm increasingly starti

Re: Sqlite and performances in LiveCode

2012-03-05 Thread Guglielmo Braguglia
Hi Pete, what you believe "... /I believe the datagrid loads only enough database rows to fill the number of rows that are visible in the datagrid .../", unfortunately, is incorrect ... ... to have this behavior you have to manually code a procedure, named "GetDataForLine", which fill in the d

Re: Sqlite and performances in LiveCode

2012-03-05 Thread stephen barncard
Well, that's the "downside" of using Livecode and expecting blazing speed for large data sets; the LC data grid is 100% Livecode based, not a 'binary object'. The upside is that it is infinitely customizable, and very easy to use. There's a lot of 'stuff' going on under the hood! Basically what you

Re: Sqlite and performances in LiveCode

2012-03-04 Thread Pete
I think the acid test here is to use sqlite3 vs Livecode, since sqlite3 is the official command line tool for sqlite and likely to be more efficient than any other browsing tool. I tested a select * from a table with about 48,000 records in it, using a datagrid versus an LC screen that invoked sql

Re: Sqlite and performances in LiveCode

2012-03-04 Thread Kay C Lan
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 w

Re: Sqlite and performances in LiveCode

2012-03-04 Thread Jérôme Rosat
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

Re: Sqlite and performances in LiveCode

2012-03-04 Thread Jérôme Rosat
No, in LiveCode, it takes 138 milliseconds more to display the result. In SQLiteManager, I don't now how many time it takes to display the result. But visually, it takes about 1 second to query and display the records in LiveCode and it is nearly instantaneous in SQLiteManager. Le 4 mars 2012

Re: Sqlite and performances in LiveCode

2012-03-03 Thread Kay C Lan
On Sun, Mar 4, 2012 at 7:00 AM, Jérôme Rosat wrote: > Do you have any ideas to improve performance? > > 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 performan

Re: Sqlite and performances in LiveCode

2012-03-03 Thread Gerry Orkin
It could be the difference in the time taken to display the returned records? I've found SQLite in LC to be pretty fast in searching large data sets. Gerry On 04/03/2012, at 10:00 AM, Jérôme Rosat wrote: > Do you have any ideas to improve performance? _

Sqlite and performances in LiveCode

2012-03-03 Thread Jérôme Rosat
Hi all, I have to create a small application to access an SQLite database. This database contains approximately 150,000 records and it increases by about 5,000 records per month. Before beginning, I read the lesson "Displaying Large Amounts of Data" on the site of RunRev and I did tests with t