[comp.sys.amiga] IDCMP causing slowdown. Help

MCARTSHA@UREGINA1.BITNET (Shan Mcarthur) (02/26/90)

Hi.
I have written a C program that will rotate a 3-D object around an arbitrary
point and display it in perspective 3-D.  The program works great.  Then I
added another section so that the IDCMP sent mouse reports to my program
so that I could read the mouse and zoom in and out accordingly.  Once I
enter my IDCMP read section, I read all the pending messages and then I
go on to the next rotation.  Then it loops back to the next read section.
What I am seeing is that the more I read the mouse, the more my program
slows down.  I am receiving nothing but mouse reports and closewindow
reports.  Why would my program exponentially slow down just by receiveing
IDCMP reports?  Please reply directly to MCARTSHA@UREGINA1  (bitnet).
Oh, by the way.  It runs faster than on a 20 MHz 286  ;-)
Shan

jimm@amiga.UUCP (Jim Mackraz) (03/03/90)

In article <9002261557.AA01813@jade.berkeley.edu> MCARTSHA@UREGINA1.BITNET (Shan Mcarthur) writes:
)Hi.
) Please reply directly to MCARTSHA@UREGINA1  (bitnet).

I don't think I could get mail through to you: hope you see this.

Intuition programs slowing down is often one of these two causes:

1) You aren't really replying to all your messages (esp. mousemove).
  This means Intuition looks through a long list of allocated messages
  before it figures out it has to allocate a new one to send you (not
  a great technique, but what we've got).

2) If you don't "clear the damage list" when a refreh event occurs, your
  window rendering/scrolling performance can go way down as you move
  windows around (probably not your problem, but common enough to mention).

  The techniques for this are to have a BeginRefresh/EndRefresh pair
  when a REFRESHWINDOW event is received, or set the NOCAREREFRESH
  window flag.

Sounds a lot like 1), especially if things get *progressively* slower.
Another thing to check for is that your processing loop doesn't
just sit there and spin on GetMsg() until some input is received.

Good luck.
	jimm
    

)I have written a C program that will rotate a 3-D object around an arbitrary
)point and display it in perspective 3-D.  The program works great.  Then I
)added another section so that the IDCMP sent mouse reports to my program
)so that I could read the mouse and zoom in and out accordingly.  Once I
)enter my IDCMP read section, I read all the pending messages and then I
)go on to the next rotation.  Then it loops back to the next read section.
)What I am seeing is that the more I read the mouse, the more my program
)slows down.  I am receiving nothing but mouse reports and closewindow
)reports.  Why would my program exponentially slow down just by receiveing
)IDCMP reports?  Please reply directly to MCARTSHA@UREGINA1  (bitnet).
)Oh, by the way.  It runs faster than on a 20 MHz 286  ;-)
)Shan


-- 
--------------------------------------------------	- opinions by me
"This voice console is a *must*.  I press Execute. 
 `Hello, I know that you've been feeling tired.
  I bring you love and deeper understanding.' "		-lyrics by Kate Bush