In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Brian Pink) wrote:

> Not a question per say, but since switching my iTunes code from
> Mac::OSA::Simple ( i.e. writing AppleScript, then compile and
> executing it ) to Mac::Glue, I've seen performance gains of about
> 300%. Any thoughts on why? Is it just my environment? Or is there
> something more there?

Mac::OSA::Simple is going to be slower for most basic operations.  It takes 
your raw AppleScript, then compiles it, then executes it; it's that 
compilation phase which is really slow.

Where it really gets speed gains is when it executes already compiled 
scripts, using either load_osa_script() to load a compiled script from disk, 
or compile() to compile script text.

Mac::Glue (baed on Mac::AppleEvents::Simple) doesn't have the slow 
AppleScript compilation phase; though it has its own slowness with 
translating the perl into raw Apple events, that's faster than compiling 
AppleScript.

-- 
Chris Nandor                      [EMAIL PROTECTED]    http://pudge.net/
Open Source Development Network    [EMAIL PROTECTED]     http://osdn.com/

Reply via email to