Skip navigation.
 
mlRe: Efficient XML loading [continuation of NSString from mapped NSData thread]
FROM : Jens Alfke
DATE : Thu May 15 17:05:39 2008

On 15 May '08, at 1:36 AM, Jean-Daniel Dupas wrote:

> 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.


Agreed. (Disclosure: I worked on AppleScript 1.0 and 1.1, and on some 
of the underlying AppleEvent infrastructure.)

> get names of all tracks (using one single AE) is pretty fast.


Yup; most of the performance issues come down to how many round-trips 
you need. In some cases the application's handling of events is slow, 
too. Sophisticated AppleEvents with "where..." clauses are effectively 
database queries, but most applications implement them via linear 
search. I've constructed single-event commands to iTunes that take a 
minute or more to return a result, with iTunes chewing up 100% of the 
CPU the whole time.

> 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.


I was basing my statements on what it would take to get all or most of 
the info in the XML file, which is basically all available metadata 
for every single track and playlist; i.e. everything but the album 
covers.

—Jens