FROM : Jean-Daniel Dupas
DATE : Thu May 15 10:36:52 2008
Le 15 mai 08 à 10:11, Matt Gough a écrit :
>
> On 15 May 2008, at 00:20, Jens Alfke wrote:
>
>> Because it would be orders of magnitude slower. Even the property
>> list parser can read the iTunes library in a few seconds.
>> Extracting all that information via AppleEvents would certainly
>> take minutes.
>> Taking that amount of time, it would be subject to race conditions,
>> since the library might change while your script is iterating it.
>>
>
> Fair enough. Out of interest, is it the exchange of the AppleEvents
> that is slow, or iTunes handling of them (if you can tell). I
> remember long ago writing some plain AppleScripts for an early
> iTunes and it could get fairly simple info in 'a few seconds' for
> large(at the time) libraries (10,000 songs). Maybe if things have
> gotten slower since then someone should report a bug. (No, I don't
> still have the scripts handy)
>
> Matt
I'm using AE to query large info set from iTunes and don't get any
performance issues. But you have to learn how to use AE.
get all tracks.
for each track in tracks
get name
is very slow. But
get names of all tracks (using one single AE)
is pretty fast.
It depends what you need. If this it just to get a list a name, it
will do the trick, if you want to query more info, you may have to
choose an other path.
DATE : Thu May 15 10:36:52 2008
Le 15 mai 08 à 10:11, Matt Gough a écrit :
>
> On 15 May 2008, at 00:20, Jens Alfke wrote:
>
>> Because it would be orders of magnitude slower. Even the property
>> list parser can read the iTunes library in a few seconds.
>> Extracting all that information via AppleEvents would certainly
>> take minutes.
>> Taking that amount of time, it would be subject to race conditions,
>> since the library might change while your script is iterating it.
>>
>
> Fair enough. Out of interest, is it the exchange of the AppleEvents
> that is slow, or iTunes handling of them (if you can tell). I
> remember long ago writing some plain AppleScripts for an early
> iTunes and it could get fairly simple info in 'a few seconds' for
> large(at the time) libraries (10,000 songs). Maybe if things have
> gotten slower since then someone should report a bug. (No, I don't
> still have the scripts handy)
>
> Matt
I'm using AE to query large info set from iTunes and don't get any
performance issues. But you have to learn how to use AE.
get all tracks.
for each track in tracks
get name
is very slow. But
get names of all tracks (using one single AE)
is pretty fast.
It depends what you need. If this it just to get a list a name, it
will do the trick, if you want to query more info, you may have to
choose an other path.
| Related mails | Author | Date |
|---|---|---|
| Keith Duncan | May 14, 16:52 | |
| Jens Alfke | May 14, 17:04 | |
| Matt Gough | May 14, 17:08 | |
| Keith Duncan | May 14, 17:22 | |
| Louis Gerbarg | May 14, 20:13 | |
| Jens Alfke | May 15, 00:20 | |
| Matt Gough | May 15, 10:11 | |
| Jean-Daniel Dupas | May 15, 10:36 | |
| Jens Alfke | May 15, 17:05 |






Cocoa mail archive

