Re: xforms 0.81 on AIX V3.2.5

Orlando Andico (
Fri, 28 Feb 1997 16:02:16 +0800 (GMT)

To subscribers of the xforms list from Orlando Andico <> :

On Wed, 26 Feb 1997, Erwin Burgstaller wrote:

> attached in fl_watch_io at 0x10029ca0
> 0x10029ca0 (fl_watch_io+0x184) 80410014 lwz r2,0x14(r1)
> (dbx) t
> fl_watch_io(0xffffffff, 0xffffffff) at 0x10029ca0
> get_next_event(0xffffffff, 0xffffffff, 0xffffffff) at 0x1000be4c
> do_interaction_step(0xffffffff) at 0x1000a6c8
> fl_treat_interaction_events(0xffffffff) at 0x1000afc4
> fl_check_forms(0xffffffff) at 0x1000b048
> main(0xffffffff, 0xffffffff) at 0x10001990
> (dbx)

Dumb solution: place a little sleep() immediately after the
fl_check_forms() call in LyX. I haven't really dug into LyX myself but I
think what's happening is that LyX is polling (fl_check_forms() is the
nonblocking check). So you have something like:


ret = fl_check_forms ();

if (ret == Button1) DoThis;
if (ret == Button2) DoThat;
else ...
sleep (1);

The idea is that, if fl_check_forms() returned nothing, go to sleep for a
while. This will _drastically_ cut down on CPU usage. Although sleep(1) is
too drastic. If your UNIX has usleep() you can use that to sleep for maybe
25 milliseconds (that's close to the limit of human response time, so your
LyX user won't know the difference).

| Orlando Andico email: |
| IRC Lab/EE Dept/UP Diliman |
| "through adventure we are not adventuresome" -- 10000 Maniacs |

To unsubscribe, send the message "unsubscribe" to or see
Xforms Home Page:
List Archive: