Did the iCal/Calendar app become slow in Mountain Lion ?

Hi,
I’ve just upgraded to Mountain Lion 10.8.3.
On Lion 10.7.5 this simple code would be executed super fast :

tell application "Calendar" --used to be "iCal"
	tell calendar "blabla"
		set theEvents to events
		repeat with anEvent in theEvents
			set s to summary of anEvent
		end repeat
	end tell
end tell

Of course this script does nothing but getting the summary, it is just for demonstration.

It is now 10 times slower in Mountain Lion.
I did a clean install of it, tried to create a new user, tried to put my calendars on my mac or on iCloud.

It seems that the more you have events in different calendars, the less Applescript and Calendar work fast.
I think this is not a problem of user cache or preferences (I deleted everything) because the script is fast if I have only one calendar with 20 events in it.

Did someone on ML 10.8.3 notice this ?

Thank you so much.

Hi.

I can’t explain the speed difference you’re experiencing, unless ‘set theEvents to events’ now returns a reference to the events instead of a list of them. (I don’t know. I’m still on Snow Leopard.)

But it’s nearly always slow to loop through things in an application. Much better, if you can, to get all the relevant information in bulk and then loop through it in vanilla AppleScript.

tell application "Calendar" --used to be "iCal"
	tell calendar "blabla"
		set theSummaries to summary of events -- A list of strings rather than of Calendar events.
	end tell
end tell

repeat with aSummary in theSummaries
	set s to contents of aSummary
end repeat