Need to filter out items of list

Dar Scott dsc at swcp.com
Tue Jun 3 15:56:15 EDT 2014


Overthinking is good!  

Here is how to think on this.  The time to ‘get line i of…” or ‘delete line i of …” is proportional to the length of the string.  If you do that in a loop, then the time doing that, total, goes up with the SQUARE of the length of the string.  That is, each time you double the length of your data, the time will quadruple.  

So, for long strings, don’t do that.

What doesn’t increase like that is “put … after …”  and “repeat for each …”.  Use that.

So, in thinking or overthinking, don’t worry about having a little parallel counter for the progress.  But watch for the “order n-squared” as some call it.

Dar



On Jun 3, 2014, at 1:13 PM, Magicgate Software - Skip Kimpel <skip at magicgate.com> wrote:

> I thought that might be a little inefficient, but once again, I am
> overthinking it!
> 
> Thanks for all of your help.
> 
> 
> On Tue, Jun 3, 2014 at 3:05 PM, Klaus major-k <klaus at major-k.de> wrote:
> 
>> Hi Skip,
>> 
>> Am 03.06.2014 um 21:02 schrieb Magicgate Software - Skip Kimpel <
>> skip at magicgate.com>:
>> 
>>> True... forgot about the "read only" issue.  Given that I have about
>>> 150,000 rows of data to process I am going to need to create some type of
>>> progress bar or counter.  Using the "repeat for each xxx" method, how
>> would
>>> I obtain the current line position?
>> 
>> manage your own counter, still fast enough!
>> ...
>> put 0 into tCounter
>> repeat for each ...
>>  add 1 to tCounter
>>  ## repeat stuff here...
>> ...
>> You get the picture :-)
>> 
>>> Thanks,
>>> 
>>> SKIP
>> 
>> Best
>> 
>> Klaus
>> 
>> --
>> Klaus Major
>> http://www.major-k.de
>> klaus at major-k.de
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list