[Pythonmac-SIG] appscript: selecting many songs in iTunes

Niko Matsakis niko at alum.mit.edu
Wed Jan 18 10:24:10 CET 2006


> Well, I'll benchmark the two approaches against my full library and
> report back on the results :).  The question is whether having more
> AppleEvents will be slower than selecting way too much data.
>

Neither is stupendously fast; the bottleneck is definitely issuing  
the individual delete commands for each track.  Both took around 30  
minutes to execute.  It seems to take around one second for a delete  
command to take effect, judged solely on watching the total track  
count decrease one by one.

Anyhow, while not great, it's fast enough for me.  Thanks for all the  
help.

Actually, I have one final question:  is it possible for handles to  
"time out?"  I remember seeing such an error once in my life in an  
earlier time playing with appscript, but the version of the script at  
that time was so inefficient .  Given that I have times as long as  
30-45 minutes from .get()ting the handle to calling .remove() on it,  
it seems possible I might elapse some kind of sanity check timers.


Niko


More information about the Pythonmac-SIG mailing list