[mcclim-devel] cpu constantly at 99% with just a simple GUI open
Dietrich Bollmann
diresu at web.de
Tue Feb 19 17:34:00 UTC 2008
Hi Troels and Andy :)
Thank you for answering so fast!
On Mon, 2008-02-18 at 17:01 +0100, Troels Henriksen wrote:
> > 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.
I am relieved :)
> 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.
I am using cmucl and clim on Debian sid - both installed from the Debian
packages.
It seems that cmucl does not have native threads on Linux:
- from http://www.cons.org/cmucl/FAQ.html
Compared with SBCL (a fork from the CMUCL implementation), CMUCL a
different set of features (it includes a Motif interface, but does
not have SBCL's native threads on Linux/x86 platforms, nor Unicode
support). CMUCL has a faster compiler, but compiled code runs at a
similar speed to SBCL-generated code. SBCL is closer to the ANSI CL
specification in some respects, and generally emits more warnings
about ANSI-compliance. SBCL runs on a larger number of platforms
than CMUCL, and in general is more actively developed than CMUCL.
- from http://sbcl.sourceforge.net/history.html
CMUCL and SBCL each have their own unique set of features: for
instance, SBCL features native machine threads on Linux/x86 (CMU
has userspace threads), and CMUCL has the generational garbage
collector on SPARC/Solaris. But in general the user-visible
difference isn't huge, since most visible bug fixes and
improvements are actively ported between the two systems.
Could this be related?
On Mon, 2008-02-18 at 11:24 -0500, Andy Hefner wrote:
> I'm only aware of this occuring if you use CMUCL, in which case you
> need to execute (mp::startup-idle-and-top-level-loops) before running
> your CLIM program due to an implementation quirk. This still isn't
> ideal, as (at least in my experience with various several year old
> versions of CMUCL) it introduces a noticable latency in event handling
> (such as menus becoming sluggish). My advice in this case is to use
> SBCL instead.
I executed (mp::startup-idle-and-top-level-loops) before running
the CLIM program - without any positive result: the CPU is still at 98%
when I start the clim examples.
I after installed SBCL, also using the Debian package. But when trying to
load/compile the clim demo I got tons of errors.
Here what I did:
(from /usr/share/doc/cl-mcclim-examples/README.Debian )
(asdf:oos 'asdf:load-op :clim-examples)
(clim-demo::demodemo)
...and here some of the errors:
The value :LOCKED is not of type (OR NULL SB-THREAD:THREAD).
The function CLIM-SYS:MAKE-LOCK is undefined.
There is no class named CLIM:WINDOW-REPAINT-EVENT.
There is no class named CLIM:KEY-PRESS-EVENT.
There is no class named CLIM:POINTER-BUTTON-PRESS-EVENT.
...and so on and so on...
Probably the sbcl and the clim packages do not match?
Should I install sbcl and clim from the sources?
Do you have some other idea how to proceed?
Which lisp do clim developers use?
Should I switch to sbcl or some other lisp when using clim?
Thanks for your help,
Dietrich
More information about the mcclim-devel
mailing list