[mcclim-devel] SBCL SLOW
Irene DURAND
idurand at labri.fr
Mon Nov 7 15:01:47 UTC 2005
Hello,
I have a problem with McCLIM and SBCL.
The following McCLIM application (which uses threads through make-process)
runs fine with both CMUCL-18e and OpenMCL but
desesperatingly slow with SBCL 0.9.5.
Each call to the command "Process" returns almost instantly with OpenMCl
and CMUCL
but takes at least 5 seconds with SBCL.
Did anyone notice a problem using threads with SBCL?
Thanks for you help,
Irène
;;;----------------------------------------------------------------------
(defpackage #:TEST
(:use :clim :clim-extensions :clim-lisp))
(in-package test)
(defvar *output-stream* nil)
(let ((*n* 0))
(defun pause ()
(incf *n*)
(dotimes (i 100000000)
(1+ 1))
(format *standard-output* "f ~A done~%" *n*)
))
(make-command-table
'file-command-table
:errorp nil
:menu '(
("Process" :command com-process)
("Quit" :command com-quit)))
(define-application-frame test ()
()
(:panes
(interactor-pane :interactor)
(result-pane
(make-pane 'clim-stream-pane
:name 'result-pane))
(quit
:push-button
:label "Quit"
:activate-callback #'(lambda (x)
(declare (ignore x))
(com-quit))))
(:layouts
(default
(vertically () quit interactor-pane result-pane))))
(defun run-test (name)
(loop for port in climi::*all-ports*
do (destroy-port port))
(setq climi::*all-ports* nil)
(let* ((frame (make-application-frame name)))
(run-frame-top-level frame)))
(defun start ()
(run-test 'test)
0)
(defmethod default-frame-top-level :before
((frame application-frame)
&key (command-parser 'command-line-command-parser)
(command-unparser 'command-line-command-unparser)
(partial-command-parser
'command-line-read-remaining-arguments-for-partial-command)
(prompt "command: "))
(declare (ignore command-parser))
(declare (ignore command-unparser))
(declare (ignore partial-command-parser))
(declare (ignore prompt))
(setf *output-stream* (climi::find-pane-named *application-frame*
'result-pane)))
(define-test-command (com-process :name t) ()
(clim-sys::make-process
(lambda ()
(let ((*standard-output* *output-stream*))
(pause)))
:name "name"
))
(define-test-command (com-quit :name t) ()
(frame-exit *application-frame*))
More information about the mcclim-devel
mailing list