Speeding a handler?

Colin Holgate coiin at verizon.net
Tue Dec 1 10:32:50 EST 2009

On Dec 1, 2009, at 9:51 AM, Ton Cardona wrote:

> I have reduced this time to 33 seconds by recording previously the numbers of the lines to be coloured and storing them in a customProp, yet it still takes 33 seconds.

In that version, were you still getting the lines from the field? What happens if you store the whole field into a variable, then run through the variable to make your list of lines to color, at the end of that do a single replace quote with empty, put the variable back into the field, and then color the lines.

At the moment you are accessing the field up to 17187 times in the routine. Transferring the field into a variable first would cut out up to 12000 of those accesses.

More information about the Use-livecode mailing list