[squeak-dev] Idle MVC RootProject is very CPU hungry

David T. Lewis lewis at mail.msen.com
Mon Apr 13 13:27:56 UTC 2020


Thanks Karl,

The overall 25% CPU use in MVC seems to be typical, I see the same on
Linux. I think that MVC still relies quite a bit on keyboard polling, and
that's probably the cause.

I'll wait a day or so before moving ST80-dtl.250 to trunk in case someone
suggests a better approach.

Dave


On Mon, Apr 13, 2020 at 08:51:43AM +0200, karl ramberg wrote:
> David,
> That drops the idle cycle down nicely on Windows 10 to 0% and the system
> still seems responsive.
> 
> If I hold a mouse button down it jumps up to around 25% cpu usage again.
> That seems a little excessive
> 
> Best,
> Karl
> 
> 
> 
> On Sun, Apr 12, 2020 at 9:59 PM David T. Lewis <lewis at mail.msen.com> wrote:
> 
> > On Sun, Apr 12, 2020 at 10:42:01AM -0700, tim Rowledge wrote:
> > >
> > >
> > > > On 2020-04-12, at 8:57 AM, Vanessa Freudenberg <vanessa at codefrau.net>
> > wrote:
> > > >
> > > >
> > > > We did add delays to the menu loops etc. many years ago. Sounds like
> > ScreenController needs that, too?
> > >
> > > Looks like it; I think the problem is that the controlLoop is basically
> > > do I want control
> > > while true
> > > do control stuff
> > > AND only the `do control stuff` has any attempt at yielding etc. So in a
> > plain empty screen we end up with a furious whizzing around of trying to
> > find an active controller, not finding one (because the ScreenController is
> > not active unless a mouse button is pressed) and looping through all that
> > ControlManager stuff that wants to find something, anything,
> > please-I'm-bored, to do.
> > >
> >
> > This seems right. The ScreenController does call interActivityPause in
> > the controlLoop, but that does not seem to be actually happening when
> > the screen is blank and there is nothing to do.
> >
> >
> > > So maybe  something something, only screencontroller in the list of
> > scheduled controllers, something, interactivityPause, something something?
> >
> > Maybe in ScheduledControllers (the ControlManager instance). If there
> > are no windows open, then there is only one entry in the list of
> > scheduledControllers, and I don't think that interactivityPause is getting
> > called in that case. So as you say maybe the control manager needs
> > to figure out when there is nothing for it to be doing.
> >
> > I put a plausible fix in the inbox in ST80-dtl.250.
> >
> > Dave
> >
> >
> >

> 



More information about the Squeak-dev mailing list