Help: #drawOn: method monopolizes processor

Russ Van Rooy russvr at blarg.net
Wed Jun 16 20:09:10 UTC 1999


Hi Tim . Thanks for your response. I tried what you advocated and placed a
'Processor yield' expression ( 1.0 to: 300.0 do: [:i | Processor yield. ) as
you nicely illustrated. Unfortunately, it did not  seem to have enough of an
effect to matter. Maybe I should try placing it in  some other strategic
spots as well ? I will continue to experiment.

thanks,
Russ
----- Original Message -----
From: Tim Rowledge <rowledge at interval.com>
To: Squeak mailinglist <squeak at cs.uiuc.edu>
Sent: Tuesday, June 15, 1999 1:37 PM
Subject: Re: Help: #drawOn: method monopolizes processor


> This is not at all surprising; your code performs a very complex
calculation
> which will take quite a while to run. Since it runs at user priority, no
> process at the same or lower priority will get any slot to run.
>
> You could:-
> a) put a 'Processor yield' somewhere in the outer loop, or
> b) startup a higher priority process that simply loops around waiting for
'x'
> milliseconds and which ought to stir-up the process lists a bit. This
depends
> on details of the process suspend/resume implementation.
>
> I'd give a) a try first because it is so much simpler.
> Change
> 1.0 to: 300.0 do: [:i | 1.0 to: 150.0 do:
> to
> 1.0 to: 300.0 do: [:i | Processor yield.
> 1.0 to: 150.0 do:
> and see if it helps.
>
> tim
>
> --
> You have a tendency to feel you are superior to most computers.
> Tim Rowledge:  rowledge at interval.com (w)  +1 (650) 842-6110 (w)
>  tim at sumeru.stanford.edu (h)  <http://sumeru.stanford.edu/tim>
>





More information about the Squeak-dev mailing list