[comp.sys.mac.system] AppleEvent Throughput...

cory@three.mv.com (Cory Kempf) (09/03/90)

chewy@apple.com (Paul Snively) writes:

>	 High-Level Events will have a higher priority than user-initiated 
>events, so that AppleEvent throughput will be at an acceptable level).

Uh, have you lookede at the actual throughput rate of AppleEvents?  I was
running some experiments the other day with AppleEvents... I wrote a simple
program that just fed Apple Events to itself.  I ran this on a MacIIx with
a couple of background tasks running in the background (GLA, CD Remote,
Moire, and waiting).  I noticed that I was giving up the CPU *FAR* too much...
According to the timing that I did, each call to WNE took on the order of
6 ticks.  I tried stacking the queue (preposting 5 AE... it actually took 
longer in the loop).  

I also tried GNE instead of WNE: no effect.  I got rid of GLA, waiting, and
CD Remote: WNE now took only 2 ticks.  

For kicks, I tried removing the call to WNE (leaving in the call to post
the AE).  Each post took about .4 ticks (still too long in my book).  I 
also tried removing the call for posting events... the entire loop (1000
cycles) completed within 1 tick (the program said that it took zero).

This is on an unloaded (e.g. no serious background processing) MacIIx
and system 7a9.  Now grant, this *IS* and alpha system release, and there
is supposed to be some code in there for debugging.  I think that these 
numbers need to be improved by at least two orders of magnitude before
the AE system can be used for internal program communications  (which
is a real pisser: I was planning on using it for my interobject 
communications to build a multithreaded application.  Now, I either
must special case or use a new system).  I know the system 7 development
team is planning on speeding up the system, but I think that a two
order of magnitude improvement is a bit much to expect.  (I would really
love to be proven wrong though!!)

I really do not think that AE throughput is at an "Acceptable Level"

+C
-- 
Cory Kempf				I do speak for the company (sometimes).
The EnigamI Co.							603 883 2474
email: cory@three.mv.com, harvard!zinn!three!cory

chewy@apple.com (Paul Snively) (09/08/90)

In article <459@three.mv.com> cory@three.mv.com (Cory Kempf) writes:
> >        High-Level Events will have a higher priority than 
user-initiated 
> >events, so that AppleEvent throughput will be at an acceptable level).
> 
> Uh, have you lookede at the actual throughput rate of AppleEvents?

Yes.  Of course, we have the advantage of having more recent software than 
you do.

> This is on an unloaded (e.g. no serious background processing) MacIIx
> and system 7a9.

Therein lies the catch.  The performance problem (I'd go so far as to call 
it a bug in the Process Manager's scheduling) certainly hadn't been fixed 
as of a9.

> I think that these 
> numbers need to be improved by at least two orders of magnitude before
> the AE system can be used for internal program communications  (which
> is a real pisser: I was planning on using it for my interobject 
> communications to build a multithreaded application.  Now, I either
> must special case or use a new system).

I agree with your assessment of a9, and I'm quite certain that you'll be 
pleased with the beta release.

> I know the system 7 development
> team is planning on speeding up the system, but I think that a two
> order of magnitude improvement is a bit much to expect.  (I would really
> love to be proven wrong though!!)

Well, in the case of AppleEvents, that speed-up has already been around 
for some time--it just hasn't gone out to "the world at large" yet.  
Again, people will be very very surprised by the beta release (by way of 
comparison to a9 in particular).

> I really do not think that AE throughput is at an "Acceptable Level"

You're quite right.  The comment wasn't intended to refer to the version 
that you have; it was intended to refer to versions that I have.

__________________________________________________________________________
                                Paul Snively
                      Macintosh Developer Technical Support
                             Apple Computer, Inc.

chewy@apple.com

Just because I work for Apple Computer, Inc. doesn't mean that I believe 
what they believe, or vice-versa.
__________________________________________________________________________