DataGrid Optimization question

zryip theSlug zryip.theslug at
Sat Sep 18 14:50:54 EDT 2010

On Sat, Sep 18, 2010 at 7:12 PM, J. Landman Gay <jacque at>
> On 9/18/10 8:56 AM, zryip theSlug wrote:
>> On Sat, Sep 18, 2010 at 1:36 PM, Monte Goulding
>> <monte at>  wrote:
>>> What about the cost of all the object creation/manipulation  that you
>>> don't need if you are just using it as data storage.
>> I speak about something easy to manipulate and you reply with cost.
> I think what Monte is saying is that because the datagrid object does all
> the same manipulations with arrays and custom properties that you could do
> yourself, using a custom property avoids a lot of code and object
> In many cases, data can be stored directly into the stack as a custom
> property (or property set) where it is easy to update using the same
> as the datagrid.
> But because your dictionary is displayed on a card, I think your method is
> good. You can let the datagrid handle the details of managing the data and
> displaying it. You need to use display fields anyway, so there is only a
> small extra cost by letting a datagrid create them. But if the data is for
> storage only, then there is no reason to have all the extra code,
> and objects -- updating a custom property set and getting values from it
> very easy and quick. You can load the entire data set into a variable with
> one line of code and access any part of it with another single line. I
> see a need to use a visual datagrid if the data is never displayed. It's
> much faster to work with a variable. Field access is one of the slowest
> things in Rev, and avoiding field access and object creation will speed up
> execution by quite a bit.
> Each method has advantages, it depends on what you need to do with the

Jacque I'm totally agree. It exists so many ways to solve a problem. I
solved this one the way I prefer developing as I explain.
Thanks to have clarified things. Because I have not totally understood
Monte's arguments, that I consider destructives.

In any case I have to regret the way I solve this because I learn a lot
about datagrid by using it.

As illustration, this is a sample of the DGH dictionary:

DGH Dictionary sample<>

In it I have defined profiles, views, etc and the code manages automatically
all of that. I can add a new property, change a row object, an event
attached to a button by updating only a parameter.

Please, consider this hidden datagrid as a table only visible by the
administrator of the stack 8-)

-Zryip TheSlug- wish you the best! 8)

More information about the Use-livecode mailing list