[CM] cmio, gtkloop on OSX

Rick Taube taube@uiuc.edu
Fri, 17 Jun 2005 15:29:14 -0700


Thanks for the report and the potential fix!  In the best of all worlds 
I could avoid the process and use a timer callback like openmcl has in 
its example code for gtk1. the problem is i cant get it to start up 
reliablly without lots of wierd errors from X. id ask you to keep using 
your nanosleep trick to see what (other) issues might come up. if it 
seems fine and no other solution can be found ill just add it to the 
code.

On Jun 16, 2005, at 4:49 PM, George Khouri wrote:

> Rick and All,
> When I open a cmio window, the added "gtk_main" lisp process forces an 
> otherwise idle OpenMCL (dppccl) process to keep my cpu occupied 
> steadily between 50% - 80% capacity on my 667MHz, 1GB powerbook, 
> running OSX 10.3.8. What's sucking up cpu cycles is the "(loop doing 
> ...)" inside the GTKLOOP function. That is to say, any such loop 
> construct is similarly cpu-intensive in OpenMCL, and it has nothing to 
> do with the gtk implementation. After killing the gkt_main process, 
> dppccl settles down to a normal < 1% cpu usage.
> Since the gtk interface just passes gui info back and forth (I think), 
> I've experimented with having the "(loop doing ...)" statement SLEEP 
> on each iteration, without any noticable ill effects for the limited 
> testing I've done, but I'm not sure what might break or not work at 
> all. (I know it's ugly.)
>
> It appears the smallest SLEEP value for OpenMCL is 0.01 sec, i.e., 
> (sleep 0.01). This sleep call in the loop pretty much frees up my cpu 
> (< 1% ) but drawing the gkt widgets is  visibly slower.
> Putting (ccl::%nanosleep 0 1000000) in the loop appears to sleep about 
> a millisecond. My cpu peaks out at about 5%-7%. This seems to be the 
> best of both worlds.
>
> Is this worth considering at least until a polling technique can be 
> made to work for GTKLOOP on OpenMCL?  My Powerbook has a very noisy, 
> annoying fan which goes on when the cpu is busy so I'm desperate!
>
> Thanks,
> George Khouri
> --------
> George Khouri
> gk1@four-four.com
> (415) 282-7560
>
> _______________________________________________
> Cmdist mailing list
> Cmdist@ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist