joaotavora / sly

Sylvester the Cat's Common Lisp IDE
1.26k stars 142 forks source link

sly-compile-defun hangs for 20-30 seconds when SLY is connected to the LispWorks #483

Open svetlyak40wt opened 2 years ago

svetlyak40wt commented 2 years ago

Tested on the LispWorks 8.0 and latest SLY (commit 19f4046decb9715907b8064807b9e97c87a278fa).

I've also added "advice" on slynk:compile-string-for-emacs inside the LispWorks, to measure how long does it and found it takes milliseconds.

Seems the problem is somewhere in the communication between Emacs and LispWorks.

By the way, evaluation in the SLY REPL returns result immediately.

Any ideas on why sly-compile-defun can be so slow or how to debug it?

joaotavora commented 2 years ago

Any ideas on why sly-compile-defun can be so slow or how to debug it?

No sorry, just play "debug it" ideas :-). In the Emacs side, there is "edebug", a stepper. You can instrument any/most functions for stepping in Emacs by C-u C-M-x. On the Lisp side, the usual trace, and break and debugger works. If SLY is generally functional but slow in that part, you can probably use SLY to debug Slynk. For example use the Sly Trace Dialog to trace the Lisp-side functions involved in the compilation process. HTH