Sqlite and performances in LiveCode

Trevor DeVore lists at mangomultimedia.com
Tue Mar 13 13:49:41 EDT 2012


On Mon, Mar 12, 2012 at 8:17 PM, Pete <pete at mollysrevenge.com> 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 called
> once for lines 1-12, then a second time for lines 1-2 again, and
> occasionally a third time for lines 1-2.
>
> I think I know the reason this is happening.
>
> The first GetDataForLine cycle happens when I set the dgProps["Columns"]
> property of the datagrid.
>
> The second cycle happens when I set the dgNumberOfRecords property.
>
> There's a possible third cycle because sometimes I set the dgProps["Sort By
> Column"] property.
>
> I have tried setting the dgNumberOfRecords to empty, zero, or NULL before
> any of the above properties are changed but it doesn't seem to make any
> difference.
>

If you have the dgNumberOfRecords set to a positive number then that makes
sense as the data grid has to redraw.

If the dgNumberOfRecords is set to 0 (and messages aren't locked when
setting it) then I'm not sure why that is. Setting the dgNumberOfRecords to
0 should do the trick as it empties out the internal sDataArray array.
GetDataForLine is only sent if an entry in the sDataArray array is NULL.

-- 
Trevor DeVore
Blue Mango Learning Systems
www.clarify-it.com    -    www.screensteps.com



More information about the use-livecode mailing list