RE: XForms: Question on Idle Callback and Delta Value

Steve Lamont (spl@szechuan.ucsd.edu)
Wed, 20 Jan 99 06:28:14 PST

# To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> One thing I tried after I posted my original message. I added a write to a
> file with the current time value in the idle callback and changed the delta
> value to 2000. Most of the time the idle callback executed once every two
> seconds, but occasionally it is called about 10 times within 1 second.
> Maybe this somehow relates to what I am seeing with the occasional button
> delay, although I did not get to the point of trying to relate the timing of
> the button push and the stream of callback executions.

I was able to easily replicate the delay problem but haven't had the
chance to trace the cause of it -- I suspect, as I said in an earlier
message, that this might be due to some form of race condition.
There's clearly a delay between the time the button is redrawn and the
actuation of the object callback that I can't directly explain but it
would seem to be a mostly benign delay.

The idle callback wasn't really designed for the kind of timing loop
for which you're attempting to use it, so this doesn't particularly
surprise me.

As for the high frequency callbacks, this again comes as no special
surprise. The idle callback is invoked in the general event handling
process, so your idle callback will be entered at the completion of
event handling for cursor motion, enter and leave, or any other X
event. If you do not wish this to occur, you should not use the idle
callback.

> The difference in CPU between the idle callback and the timeout is not
> significant. ...
> ... Since I have some control over my own
> processes and very little control over the HP Openview processes I wanted to
> have mine be as efficient as possible. (Or maybe its just a personal hangup
> about not wanting to see my processes in the top 10 when someone runs top

IMnsHO this comes under the grand heading of "Sweating the Small
Stuff." :-)

After all, the top process shown by `top' is often `top' itself.

spl
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/