Optimizing the processing time of the Datagrid

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
William Jamieson
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 212
Joined: Fri Feb 01, 2013 1:31 am
Contact:

Optimizing the processing time of the Datagrid

Post by William Jamieson » Fri Jul 25, 2014 1:53 am

So I have been working with datagrids that are infinitely long lately with lots of graphics and I was wondering if people had any suggestions on how to speed it up even more. I got the processing time from 12.5 seconds down to 1.75 with 4 rows and 2 images. Still looking for further ways to cut down time. Yes, I have read all the documentation. Those are a good start, but I have realized that there is a lot more to Livecode than could be put in 20 pages of documentation.

So far I have gone through a few trials and errors myself

1) loading images from the cloud in the DG script VS on the card to pass to the DG

2) organizing the rows using "SortDataofIndex" VS organizing the data using special made handlers that pick apart keys of the array

3) How many rows to pass information for at a time (LOT VS LITTLE)

4) Refreshing the index VS Refreshing the DG

5) Adding data to the end VS resetting the DGData

So these are some of the things I have been playing around with lately and I have learned a lot about the behavior of the DG.

So I want to start a discussion about methods, experiences, and ways that people use to optimize the DataGrid.

Here is some cases:
A) When loading images from the cloud
B) Applying different sorts
C) updating indexes
D) initial loading time on opencard
E) Adding rows to the datagrid


What are your methods for streamlining the DG?

Post Reply