[Bf-committers] Re: [RFC] Re: Blender profiling-1 O16.2int

Hans Lambermont bf-committers@blender.org
Wed, 27 Aug 2003 20:21:03 +0200


Ton Roosendaal wrote:

> Can someone translate this for me?

Basically it comes down to what is called 'busy waiting'. In a tight
loop, perhaps with a sleep in it or not, that doesn't matter, a device
value is read, over and over again, to detect whether it changes. This
is called 'polling'. Too busy polling leaves no CPU time left for fi. X.
The other approach (the better one) is to let the OS give you a signal
when the device's value changed. This is done with a 'select' call.
However, if you give this select call a too short timeout you get the
symptoms of busy waiting again.

I do not know whether we use select at all here, but both select with
too small timeouts and polling can cause the situation we're seeing.

'hope this helps someone, I don't have the time to dig into it.

Hans
-- 
http://lambermont.webhop.org/   () ascii ribbon campaign - against HTML mail,
                                /\ vCards and proprietary formats