home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!usc!howland.reston.ans.net!sol.ctr.columbia.edu!eff!news.oc.com!spssig.spss.com!uchinews!quads!chh9
- From: chh9@quads.uchicago.edu (Conrad Halling)
- Subject: Re: Slow drawing under System 7
- Message-ID: <1993Jan21.204855.3849@midway.uchicago.edu>
- Sender: news@uchinews.uchicago.edu (News System)
- Reply-To: chh9@midway.uchicago.edu
- Organization: University of Chicago
- References: <1993Jan19.222529.1@cc.newcastle.edu.au>
- Date: Thu, 21 Jan 1993 20:48:55 GMT
- Lines: 32
-
- In article <1993Jan19.222529.1@cc.newcastle.edu.au>
- cegrw@cc.newcastle.edu.au
- (Dr Garry Willgoose: INTERNET cegrw@cc.newcastle.edu.au) writes:
-
- >I have a program that basically puts up on screen a huge number of filled
- >rectangles. Just a plain loop with relevant QD commands and a call to
- >WaitNextEvent with wait time set to 0. Well this code has worked fine to ages
- >on a system 6 machine but when I moved it recently to a Powerbook 170 running
- >S7 it runs really slow ... unless I keep moving the mouse around and then it
- >runs just like before. Actually this same behaviour is shown by another
- >part of the code where a series of line segments is drawn so its not a
- >function of the particular QD calls. The picture is being saved a PICT2 as the
- >pict is drawn.
-
- The PowerBook goes into resting (idling or processor cycling) mode when
- certain activities are not occurring. (One of the activities that prevents
- resting is moving the mouse.) This is what is causing your
- program to slow down. The net result is that PowerBook behaves as if
- the processor were running at 1 MHz.
-
- Read chapter 31 of Inside Macintosh Vol VI about the Power Manger. Your
- program needs to call Gestalt() to determine if the Power Manager is
- present (p. 31-12). (The Power Manager is present only for the Portable
- and PowerBooks). If the Power Manager is present, then call IdleUpdate()
- (p. 31-19) each time through your event loop when you're doing something
- significant. If you have nothing to do on null events, then don't call
- IdleUpdate(), and the PowerBook can go into rest mode, which is a good
- thing for battery charging.
- --
- Conrad Halling
- c-halling@uchicago.edu
-
-