• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to access iTunes using cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to access iTunes using cocoa


  • Subject: Re: How to access iTunes using cocoa
  • From: Jens Alfke <email@hidden>
  • Date: Tue, 26 Jan 2010 10:51:03 -0800


On Jan 26, 2010, at 10:17 AM, Matt Neuburg wrote:

NSAppleScript is your slowest
choice because it slows way down as you loop and access memory (such as
lists). Scripting Bridge and objc-appscript do all the heavy lifting in
Objective-C and just throw Apple events at the target, so they are
inherently much faster, and your bottlenecks are then your choice of Apple
event and how long the target takes to process each Apple event.

AppleScript isn't fast, but you'd have to scale up to much, much larger data sets to see a real slowdown. I've done a fair bit of iTunes scripting using [NS]AppleScript, and when the scripts have run slowly, it's always been iTunes itself at fault. (Its AE object resolution support is pretty naively written and doesn't implement any of the fast-querying shortcuts, instead just doing linear searches over the whole library.) So it wouldn't matter what technology you used to send the events, because all the time is spent waiting for iTunes to send a reply.


—Jens_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: How to access iTunes using cocoa
      • From: "Paul Sanders" <email@hidden>
References: 
 >Re: How to access iTunes using cocoa (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: How to access iTunes using cocoa
  • Next by Date: Re: How to access iTunes using cocoa
  • Previous by thread: Re: How to access iTunes using cocoa
  • Next by thread: Re: How to access iTunes using cocoa
  • Index(es):
    • Date
    • Thread