use-livecode Digest, Vol 250, Issue 1
David V Glasgow
dvglasgow at gmail.com
Sat Jul 27 08:01:45 EDT 2024
> On 3 Jul 2024, at 2:05 am, Neville Smythe via use-livecode <use-livecode at lists.runrev.com> wrote:
>
> There is however
>
> filter elements of <array> with <str> into tLines; put line 1 of the keys of tLines into tFoundLine
>
> And that is still very fast on unicode, even though it will find all the lines matching str, not just the first. This can be an advantage or not. [Note <str> does need to be set up to match a whole line]
Ooooh! Interesting!
I have an app I haven’t touched for a while that makes heavy use of filter of string variables up to 1,000,000 lines (but often only hundreds to tens of thousands of lines). In my case finding all lines containing the to be found string is a benefit
I have long intended to see if I can speed things up a bit. Should I go back and look at converting string lists to arrays, then using filter, and finally converting back to a variable? I suppose I could do this contingent upon number of lines just in case time penalties and benefits are not linear…
Any thoughts/advice welcome.
Cheers
David G
David Glasgow
Consultant Forensic & Clinical Psychologist
Honorary Professor, Nottingham Trent University
Sexual Offences, Crime and Misconduct Research Unit
Carlton Glasgow Partnership
Director, Child & Family Training, York
LinkedIn <https://www.linkedin.com/in/davidvglasgow/>
More information about the use-livecode
mailing list