[comp.sys.mac.programmer] Variable QuickDraw Performance?

J.COOK@ENS.Prime.COM (03/16/90)

Variable QuickDraw Performance?

I don't understand.  QuickDraw seems to give different levels of performance
depending upon when it is invoked for a flying line application.  I don't see
why it is happening.

Take the "Flying Line" program from the "Macintosh Programming Primer" by
Mark & Reed.  Basically, this program blanks the screen and then draws five
lines.  It draws the lines in XOR mode.  The first line is drawn by picking
two random endpoints and drawing a line between them.  Succeeeding lines are
drawn by applying a delta-x and delta-y to each endpoint to arrive at a new
pair of endpoints to draw a line between.  Once five lines are up, the
algorithm "loops" by erasing the oldest line by redrawing it in XOR mode
and drawing a new line based on the newest line.  In this manner, you have
a set of five lines flying about the screen.

The program works, however, when it is run, it may run at speed "x" or at
speed "2x".  I would even claim there is a speed "4x".  There is no predicting.
This is all observed by eye.

So, the question is:  Why?  I've tried two different machines.  The first is
an 8Mb II with a Radius 1152 x 882 with a Radius QuickColor Graphics
Accelerator both on and off.  A moderate number (< 6) CDEVs/Inits and Apple-
talk are present.  The second machine was an 8Mb IIx with a standard Apple 13"
RGB monitor driven by a RasterOps 264 card, no printer, no external devices,
no Appletalk, and practially no CDEVs/Inits other than that shipped by Apple.
In all cases, the expected combinations were tried: 1-bit, 8-bit, 32-bit
graphics mode, Multifinder on/off, Appletalk/inits/cdevs/external devices
removed, if possible.

Nothing seemed to be the key.  Any ideas?  My only thought is that the
slowdown is due to a task tied to the VBL, but why would it sometimes
affect things and not others?  The presense or absense of a SystemTask()
call does not make a difference.

This obviously is not a critical problem, but I am really curious.

Thanks if you know,
Jim Cook
J.COOK@ENS.PRIME.COM
(Note: Mail to me may bounce this weekend while our network is being
 reconfigured).
Disclaimer: "Just my confusion, not Prime's".