Re: Repeat for each line of a variable or field?

2019-01-14 Thread Bob Sneidar via use-livecode
Also if you do not lock the screen the engine has to update the display each time a line changes. Not sure if this is the case if the line is not visible... Bob S > On Jan 12, 2019, at 08:37 , JB via use-livecode > wrote: > > It is faster to use version 1 because accessing the > lines in a v

Re: Repeat for each line of a variable or field?

2019-01-12 Thread J. Landman Gay via use-livecode
Variables are always faster, but how much faster depends on what you're doing in the "etc" part. Just reading the lines will be quicker than writing back to the field on each iteration. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On J

Re: Repeat for each line of a variable or field?

2019-01-12 Thread Tore Nilsen via use-livecode
When using a field with close to 45000 lines, the second (using the lines of the field) version takes on average 23 milliseconds, whereas using a variable takes on average 15 milliseconds. For a field /variable with 5000 lines the difference is about 2 milliseconds here. The actual speed and di

Re: Repeat for each line of a variable or field?

2019-01-12 Thread JB via use-livecode
It is faster to use version 1 because accessing the lines in a variable is faster than accessing lines in a field. JB > On Jan 12, 2019, at 8:01 AM, David Epstein via use-livecode > wrote: > > I've done a little bit of speed testing showing extremely slight differences, > but wonder if anyon

Repeat for each line of a variable or field?

2019-01-12 Thread David Epstein via use-livecode
I've done a little bit of speed testing showing extremely slight differences, but wonder if anyone who understands the "engine" can advise on this: Is there a difference between these two approaches? (1) put fld 1 into txt; repeat for each line k in txt; etc. and (2) repeat for each line k in f