Re: Is there a way to speed this up?
Re: Is there a way to speed this up?
- Subject: Re: Is there a way to speed this up?
- From: Steve Mills <email@hidden>
- Date: Tue, 04 Oct 2016 18:07:31 -0500
> On Oct 4, 2016, at 17:55, Brian Christmas <email@hidden> wrote:
>
> G’day
>
> I’m in the process of writing a ‘search’ script to find a list of emails sent by any particular client, over a period of up to 5 years.
>
> The number of paragraphs to be searched is over a million, and just for my own test records, of some 180,000 paragraphs, it takes 28 seconds.
>
> I’d like to speed it up a tad, and am wondering if there’s any simple command to replace the repeat that individually scans each paragraph in a file, with a faster method.
>
> I really don’t think there’s such a thing as ‘set x to every paragraph of y whose text contain “abc”'
Off the top of my head, I'd wait to do the "paragraph" stuff until it's actually needed, otherwise you're just wasting time for all the emails that don't contain the search string. So just test the entire hunk of text. If it's found, then find the paragraph that contains it.
Steve via iPad
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden