On 10/08/15 02:54, Michael Doub wrote:
Richmond,
Just so you know what is going on. Each time a change in made to a
field, a lot of management code is executed to properly render the
field in case it is needed to be visible. So when a field is
modified within a loop, that field management code is executed over
and over. When the data is moved into a variable then manipulated
the field management code is only executed when the results are put
back into the field.
In almost all cases it is much faster to copy a field into a variable,
manipulate the data, then put it back in the field when you want to
make it visible.
Regards,
Mike
Thanks: you read my mind - I was going to get up this morning and ask 'why'?
I suffer from a serious problem: I learnt all about this sort of stuff
donkey's years ago (about 30) and
since the fact that I have a computer that sits on my desk that at
'only' 9 years old wipes the floor
with anything available 30 years ago (VAX mainframe) I had really
overlooked that sort of thing,
to the extent of completely forgetting about it.
This is, also, the first time I have used a programming
language/suite/IDE to process large amounts of data since
my BA project in PASCAL (30 years ago) - which, using a much shorter
text than Jane Austen's complete works
(an English translation of Leibniz's /Monadology/) crashed the
University of Durham mainframe; and that didn't
render any visual stuff on screen whatsoever.
I shall now become obsessive about loading everything into variables :)
Richmond.
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode