• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: degrading script performance in Mail
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >degrading script performance in Mail (From: patrick machielse <email@hidden>)
 >Fwd: degrading script performance in Mail (From: patrick machielse <email@hidden>)
 >Re: degrading script performance in Mail (From: deivy petrescu <email@hidden>)

  • Prev by Date: Re: degrading script performance in Mail
  • Next by Date: Re: Clipboard and Entourage
  • Previous by thread: Re: degrading script performance in Mail
  • Next by thread: Re: degrading script performance in Mail
  • Index(es):
    • Date
    • Thread