[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Refreshing windows as often as possible, but not too often



Havoc Pennington wrote:
> 
> On Sat, 9 Oct 1999, Ben Laurie wrote:
> > gtk_idle_add(). The snag is that it _really_ interferes with user
> > interaction. The mouse is like treacle, it takes ages to shut down,
> > window focus doesn't work, and so on.
> >
> > Using nice(5) or so reduces the problem, but it comes back after a
> > while. Inserting a 1/10 second nap into each iteration helps, too. But
> > that's crap. So how do I do it _right_??
> >
> 
> Use a timeout - an idle runs as often as it can given your machine's CPU
> and disk limitations. A timeout runs at a given interval. Sounds like you
> don't want to crush your machine with continuous activity, so an idle is
> wrong. :-)

Hmm. But the effect I really want is to use as much CPU as is available,
but leave some when needed for stuff like moving the pointer. I can
write a non-X app that doesn't chew the _whole_ CPU when someone else
wants it, why can't it be the same with X?

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
     - Indira Gandhi



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]