• 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: Results differ in editor and applet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Results differ in editor and applet


  • Subject: Re: Results differ in editor and applet
  • From: has <email@hidden>
  • Date: Fri, 27 Feb 2004 00:25:10 +0000

Chris Espinosa wrote:

[on terminology loading]

Because the AppleScript runtime (the part that runs the scripts)
doesn't want to invest the extra time in loading all the information
that's needed in order to compile and syntax-check scripts if it's not
necessary.

Based on my own experience, I'd add that parsing a terminology resource is a fairly simple operation, taking a trivial (i.e. unnoticeable) amount of time on modern Macs.

As far as I can tell, the expensive bit seems to be the OSAGetAppTerminology system call to retrieve the terminology data from the application in the first place. I don't know why this should be, but maybe the AS engineers can shed some light on it? [1]


The textual representation of event, class, and parameter
names is needed only when you compile a script (or when an error is
being reported), so it's not loaded when you're just running scripts.

This is true of AppleScript, but not necessarily of other languages. e.g. Perl and Python scripts [2] are written using terminology keywords and saved in source form, and the raw AE codes aren't looked up until Apple events are actually sent at run time.

has

[1] I'd particularly like to find out, as it's causing a painful performance hit for scripting apps with Python and appscript -- approx +1sec per app OMM. (Note: I can't guarantee the problem's not in the Python extension that calls OSAGetAppTerminology, but this seems unlikely given its simplicity.)

[2] using Mac::Glue and appscript/aeve modules respectively
--
http://freespace.virgin.net/hamish.sanderson/
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Results differ in editor and applet
      • From: Chris Espinosa <email@hidden>
  • Prev by Date: Odd make folder behaviour
  • Next by Date: Re: Results differ in editor and applet
  • Previous by thread: Re: Results differ in editor and applet
  • Next by thread: Re: Results differ in editor and applet
  • Index(es):
    • Date
    • Thread