• 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: speed advantage of OSAXen
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: speed advantage of OSAXen


  • Subject: RE: speed advantage of OSAXen
  • From: Olof Hellman <email@hidden>
  • Date: Fri, 25 Jan 2002 15:16:56 -0800

Michael asks:

> Do osaxen have any speed advantages over apps?
>
> It strikes me that they don't -- they still involve an apple
> event call, it's just to the system instead of an app. Maybe that makes
it
> marginally faster, but it still takes aeons compared to a straight
> language command.
>

There are very measurable speed advantages. When an application handles an
AppleEvent, a context switch is made to the application context, and the
event has to come in through the cooperative multitasking event dispatch of
MacOS. The exception is when an application dispatches an event to itself:
in this case there's no need for a switch because the app is already the
current process. (MacOS X changes the event dispatch quite a bit -- can
anyone comment on the situation there?)

No such context switch is required for events handled by OSAX -- they live
inside the system.

>ASCII number/character is a perfect example.

Do you have data on how long this call takes? The standard additions OSAX
seems to be a special beast, in that its handlers are not installed in the
usual way ( no 'osiz' resource ) . I have no idea how it works.

- Olof


  • Prev by Date: Re: Simple calculation
  • Next by Date: RE: speed advantage of OSAXen
  • Previous by thread: Re: Extract from digest
  • Next by thread: RE: speed advantage of OSAXen
  • Index(es):
    • Date
    • Thread