How to filter a big list

Sarah Reichelt sarah.reichelt at gmail.com
Mon Oct 19 17:49:33 EDT 2009


On Tue, Oct 20, 2009 at 6:49 AM, Jérôme Rosat <jrosat at mac.com> wrote:
> I wish to filter a list which contains approximately 300'000 lines. I try
> the "filter ... with" command. It's slow.
>
> I try the "Repeat for each" loop but it's slower.
>
> Is it possible to use the "filter ... with" command and to "force" RunRev to
> check only one "item" of the line and not the whole line with the
> "filterPattern" ?


What filter pattern are you using? I have found filter to be very fast
even with large lists, provided the filter pattern is simple.
e.g. filter with "*blue*" is fast but filter with "*" & tab & "*" &
tab & "*blue* will be slow.

If this is the sort of thing you are trying, then I suggest a
preliminary fast filter to get the overall length down, then maybe
changing to a "repeat for each" loop to refine the filter.
And as Chris said, make sure you are always operating on a variable,
not the contents of a field.

Cheers,
Sarah



More information about the use-livecode mailing list