On 5 Nov 2015, at 2:03 PM, Shane Stanley <email@hidden> wrote:
And this script creates a new event.
FWIW, I decided to try to match Jay's situation a bit more closely. So I took the script above, removed the Calendar.app part, then wrapped it in a repeat loop to add 8000 events to an iCloud calendar, each an hour after the previous one. I'm now booked out 24/7 for most of the next year...
I didn't really think about how long it would take to run, but I made a few observations while it was running. It took just over an hour, so a bit less than half a second per event. (It would have been quicker to save the events and commit them all at once, but I wasn't really worried about performance in this part of the test.)
While it was running, I had a look at CPU use in Activity Monitor. Without Calendar.app running, it was showing CalendarAgent using 150%, accountd 60%, CalNCService 35%, and the app running the script (ASObjC Explorer) 55%. That's a lot of work being done. With Calendar.app also running, it used 45%, CalendarAgent moved to 170%, and the others dropped back about 10% each. My iMac is only few months old, but this was the first time I've really been aware of fan noise; it was pushing the machine.
So now I have this iCloud calendar of about 8000 events, I can test adding and deleting events. Using more-or-less the code posted here, it takes around 0.4-0.5 seconds to add a new event, and a bit longer (0.6-0.7) to delete one (based in UID). All thing considered, that doesn't strike me as particularly outrageous.
My set-up is obviously not the same as Jay's, and the settings and spans of his events might make a difference, but I suspect not much.
|