Mail.app "move message" command ridiculously slow in Lion

My script for archiving Mail messages has taken a major performance hit under Lion. Here’s the relevant bit:

tell application "Mail"
	repeat with thisMessageViewer in message viewers
		if window of thisMessageViewer is first window then
			set theSelectedMessages to selection
			if theSelectedMessages is {} then
				return
			end if
			repeat with theMessage in theSelectedMessages
				set theAccount to name of account of mailbox of theMessage
				move theMessage to mailbox "Archive" of account theAccount
			end repeat
			return
		end if
	end repeat
end tell

For me, it’s taking anywhere between 2-20 seconds to complete the “move theMessage…” line. And on my machine, this was a sub-second task in Snow Leopard (it could process >10 messages per second).

Can anyone confirm whether this is a Lion issue, and is there a faster syntax for dealing with the “move” command?

Thanks!

I’m suffering from the same - was blazing fast on 10.6 and now painfully slow.

See also http://superuser.com/questions/319445/os-x-lion-applescript-greatly-slowed-down

Thanks. Since I know it’s not just me now, I’ve submitted a bug report to Apple.

Open Radar here.