[mcclim-devel] cpu constantly at 99% with just a simple GUI open

Troels Henriksen athas at sigkill.dk
Mon Feb 18 16:01:23 UTC 2008


Dietrich Bollmann <diresu at web.de> writes:

> Hi,
>
> I build a very small GUI based on the calculator example.  
> But when starting the GUI the CPU is constantly at 99%.  
>
> Is this normal?

No, it is not.

> Is there some configuration option to get a different behaviour?  
> Does McCLIM use some kind of polling internally?  
> And is there some hope that this might change in the future?

Are you using a single-threaded Lisp? I recall from ages past that
this behaviour may occur under such circumstances, but I haven't used
such a Lisp in a long time myself.

> Some day I would like to experiment with some realtime application and a
> busy CPU probably wouldn't be something good :)

It also contributes to global warming! McCLIM kills polar bears!

> By the way:  Rick Taube, the author of "lambda-gtk" and "common music"
> recently seemed to have switched from lambda-gtk to a C++ based gui
> (using "juce") which seems to communicate with his lisp code via a
> socket.  I suppose that his main reason was the audio functionality
> which is part of "juce" and the possibility to easily use the same code
> for Windows, Mac and Linux.  But another reason might have been a better
> realtime behaviour compared to the lambda-gtk gui.  Would this be a
> better way to go?

If you need behaviour like this, then yes, it's a good way to go. For
McCLIM, I'm not interested in having too much non-Lisp code around,
but a backend can talk to whatever it want. In fact, the CLX backend
talks to a C program (the X-server) anyway. I like keeping as much in
Lisp as possible (and I consider the fact that the X-server is not
written in Lisp to be a more or less temporary problem, and at least
one that can be solved independently of McCLIM itself).

-- 
\  Troels
/\ Henriksen



More information about the mcclim-devel mailing list