degrading script performance in Mail
degrading script performance in Mail
- Subject: degrading script performance in Mail
- From: patrick machielse <email@hidden>
- Date: Fri, 26 Aug 2005 09:52:46 +0200
I'm trying to script Apple Mail 2.0.2. Essentially I want to set the
read status of all messages in a particular mailbox. As an example, I
use the following code:
tell application "Mail"
set read status of every message of mailbox "ADC" to false
end tell
"ADC" is a mailbox containing some 300 messages. The first time I run
this script after opening Mail it will complete in a matter of
seconds. However, the 5th run takes about a minute on my (slow)
machine, and performance only continues to degrade. I can actually
watch the blue dots being drawn in front of each message. Then after
all blue dots are there, spotlight runs (mds and mdimport) for a
while. During all this time you can not use other mailboxes; Mail
reports them as empty (which is quite scary).
Selecting the messages in Mail 'by hand' and using the menu to set
their read status remains equally fast, no matter how often you use
it, and also doesn't seem to trigger any indexing activity.
It this a bug in Mail, or is my script to naive?
patrick
_______________________________________________
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