[comp.sys.mac.programmer] Help, my app runs slower on a IIci!

ba0k+@andrew.cmu.edu (Brian Patrick Arnold) (12/21/89)

Hello folks,

    Somebody help me figure out what I'm doing wrong!

    I've written an application that's MultiFinder-friendly specifically
for Mac II's.  It was ported from a Sun III.  It's been compiled with
MPW Pascal 3.0 and it uses MacApp 2.0b9 for its user interface.  I
hooked the Sun-ported part into MacApp to call the gApplication.GetEvent
function and process some events (I allow background-type events and
trap for command-period if the user wants to stop) while evaluating.  I
use TickCount to make sure I only call GetEvent about 6 times per second
(so I don't spend all my time processing null events).  Performance on a
Mac II is roughly comparable to the Sun III under similar circumstances
(few processes etc).  It is about 30% faster on a Mac IIcx compared to a
vanilla Mac II, and doesn't degrade in performance significantly if run
with a print spooler like "Janus" in the background.  It's been running
pretty swell for a while.

   BUT!

   On a Mac IIci, even under uniFinder, my app runs about 50% SLOWER! 
Now, I can tell that the file-reading from disk is definitely faster,
but the memory/math-intensive computations are definitely slower.  I use
some SANE881 and some direct 68881.  To make things wierder, I thought
for a moment that perhaps WNE was taking longer on a IIci, so I timed my
event-processing hook on a IIcx and on a IIci.  The results were 3
seconds vs. 9 seconds spent in WNE on a 24 seconds vs. 36 seconds
computation.  That's wierd in itself.

   The Mac IIci has 8 MB of 80 ns third-party SIMM RAM installed.

   In the debug version, I turned on MacApp's performance tool to see
who's eating up time.  For reasons that escape me, a 2-3 minute
computation only reports about 160 hits (w/4 ms interval) on both the
IIcx and the IIci.  It reported that a single procedure in my app was
getting about 100 of those hits on both the IIcx and the IIci, which
frightens me, but doesn't explain why the IIci should compute slower
than a IIcx.  Trying to match ROM hits is humorous since I (or the perf
tools) don't have a ROM map for the IIci.  I thought I fixed the
performance problem in the apparently slow procedure, which reduced the
hits in my app for a 2-3 minute computation to about 40 hits, but the
non-debug version is still just as slow on a IIci compared on a IIcx.

   Ack!  I'm dying here!  What on earth am I doing wrong?

   Somebody please help by responding via e-mail.  Thanks for any little
tibdbit or suggestion you can provide.

- Brian