[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Garbage collection and screen updates...
- To: DOYLE@SISU
- Subject: Re: Garbage collection and screen updates...
- From: bill (Bill St. Clair)
- Date: Mon, 16 Sep 91 20:10:20 EST
- Cc: info-macl@cambridge.apple.com
> Date: Mon, 16 Sep 1991 11:39 EST
> From: DOYLE@SISU
> Subject: Garbage collection and screen updates...
> To: info-macl@cambridge.apple.com
> X-Envelope-To: info-macl@cambridge.apple.com
> X-Vms-To: HELIX::IN%"info-macl@cambridge.apple.com"
>
> ;;; Greetings...
> ;;;
> ;;; I've been having some trouble with screen redraws following
> ;;; garbage collection. Below is some code that has similar
> ;;; behavior to what I'm encountering.
> ;;;
> ;;; Invoking redraw-all-everytime redraws the entire screen.
> ;;; It looks as if _InvalRect is called using the screen rect.
> ;;;
> ;;; This looks particularly klunky when there are several images
> ;;; on a screen.. everything disappears and then pops back as
> ;;; the view-draw-contents methods are invoked.
> ;;
> ;;; So... is there any way of preventing a global redraw?
> ;;;
> [...]
By default, MCL's garbage collector periodically polls for events. This
allows other applications to get processor time while MCL is garbage
collecting (so that, e.g., you can read your mail while MCL is
compiling in the background without annoying pauses while MCL GC's).
The GC does not mask update events, because if it did, they would
reoccur. Hence it has to do something to remember that an update event
happenned. Since we haven't yet created any per/window bits, it sets a
single bit. After the GC is over, EVENT-DISPATCH sees that this bit is
set, and it erases and redraws all the windows.
You can disable this behavior at the expense of making MCL hog the machine
whenever it garbage collects. We have considered changing the default.
Opinions?
(SET-GC-EVENT-CHECK-ENABLED-P NIL)
will disable event checking during garbage collection.
(SET-GC-EVENT-CHECK-ENABLED-P T)
will enable event checking during garbage collection.
(GC-EVENT-CHECK-ENABLED-P)
Returns true if event checking is enabled during garbage collection.