Re: degrading script performance in Mail
Re: degrading script performance in Mail
- Subject: Re: degrading script performance in Mail
- From: deivy petrescu <email@hidden>
- Date: Sat, 27 Aug 2005 13:27:41 -0400
On Aug 27, 2005, at 13:06, deivy petrescu wrote:
Patrick, I've run many times the following script (in Smile, mind you)
<script>
chrono
tell application "Mail"
set l to name of every account
set j to item 1 of l as string
tell account j
set k to read status of every message of mailbox 1
end tell
end tell
return {chrono, count of k}
-- {0.430169999949, 1124}
</script>
So it takes 0.43 seconds to get the read status of 1124 messages.
consistent over many runs!
However (still in Smile):
<script>
chrono
tell application "Mail"
set l to name of every account --(mailbox "Inbox")
set j to item 1 of l as string
--return j
tell account j
set k to read status of messages 1 thru 50 of mailbox 1
end tell
end tell
return {chrono, count of k}
-- {5.872329999984, 50}
</script>
Same behavior in SE.
It means you're better off if you get the whole set and then filter
it than filtering it in Mail.
deivy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden