[Data Grid] Duplicate large amount of rows
bobs at twft.com
Fri Apr 30 12:13:34 EDT 2010
I would be careful with using arrays this way. I seem to recall in the command reference that combining an array will delete duplicate keys. As long as your keys are all unique you should be safe, but I would check the command reference for the join function you are using.
> The union command combines the array and testArray. Each key of the array is checked to see whether there is already an element with that key in the testArray. If there is, that element of the array is unchanged. If not, the corresponding element of the testArray is placed in the array.
So you see, this does not exactly add all the records of one array to another. It depends on the keys in both arrays being globally unique.
On Apr 29, 2010, at 3:46 PM, zryip theSlug wrote:
> Hi all,
> First to duplicate rows in a DG, I used the AddData command in a loop.
> But over 1000 lines to duplicate, the performances are dramatics.
> Then, I changed my mind.
> 1) I build an array with all the duplicated
> 2) I merge the dgData of my DG with this array by using the union command.
> 3) At last, I set the dgData to the merged array.
> It seems working as fast as ever with 4000 records. Maybe too fast...
> Can I encounter problems in doing this union?
> Should I refresh the dgIndexes?
> -Zryip TheSlug- wish you the best! 8)
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode