Geiser is slow when running with geiser-guile-load-init-file set to t

  • Open
  • quality assurance status badge
Details
One participant
  • Tomas Volf
Owner
unassigned
Submitted by
Tomas Volf
Severity
normal
T
T
Tomas Volf wrote on 10 Mar 02:13 +0100
(address . bug-guix@gnu.org)
Ze0JIBx09sBwpPKD@ws
Hello,

I discovered that when I run Geiser with geiser-guile-load-init-file set to t,
it results in horrible experience, when the REPL seems to technically work, but
anything takes a long time (completion is on order of seconds).

I found out that it is caused by the readline activation. I am unsure how to
solve this properly. For me the workaround was to move the readline check
inside the (unless (getenv "INSIDE_EMACS") ...), since I do not need it there.
I was contemplating sending a patch doing just so, but I realized that also
disables readline in any shell mode. I personally do not care about that (I
only interact with guile from Emacs using Geiser, at least for now), but someone
else might care.

Ignoring the fact that disabling the colors for ansi-term (and other modes?)
might not be necessary neither, I am not sure how to write more robust check.

The patch I was considering is at the end of the email, feel free to use it if
the trade-off would be acceptable.

Toggle diff (53 lines)
diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index d9f13271d8..fcd1d76c18 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -215,24 +215,26 @@ (define %default-nanorc

(define %default-dotguile
(plain-file "dot-guile"
- "(cond ((false-if-exception (resolve-interface '(ice-9 readline)))
- =>
- (lambda (module)
- ;; Enable completion and input history at the REPL.
- ((module-ref module 'activate-readline))))
- (else
- (display \"Consider installing the 'guile-readline' package for
-convenient interactive line editing and input history.\\n\\n\")))
+ ";;; -*- mode: scheme -*-

- (unless (getenv \"INSIDE_EMACS\")
- (cond ((false-if-exception (resolve-interface '(ice-9 colorized)))
- =>
- (lambda (module)
- ;; Enable completion and input history at the REPL.
- ((module-ref module 'activate-colorized))))
- (else
- (display \"Consider installing the 'guile-colorized' package
-for a colorful Guile experience.\\n\\n\"))))\n"))
+(unless (getenv \"INSIDE_EMACS\")
+ (cond ((false-if-exception (resolve-interface '(ice-9 readline)))
+ =>
+ (lambda (module)
+ ;; Enable completion and input history at the REPL.
+ ((module-ref module 'activate-readline))))
+ (else
+ (display \"Consider installing the 'guile-readline' package for
+convenient interactive line editing and input history.\n\n\")))
+
+ (cond ((false-if-exception (resolve-interface '(ice-9 colorized)))
+ =>
+ (lambda (module)
+ ;; Enable completion and input history at the REPL.
+ ((module-ref module 'activate-colorized))))
+ (else
+ (display \"Consider installing the 'guile-colorized' package
+for a colorful Guile experience.\n\n\"))))\n"))

(define %default-skeleton-home-config
(plain-file "default-home-config" "\


Have a nice day,
Tomas Volf

--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmXtCSAACgkQL7/ufbZ/
walGjw/+KX85f6vr22hatMyIOD35OpF9kz89VoPvuq8dKZ1n60lTDzxxv52OM7W8
fc1jkCr2+3PleJ8nzHKbm8zdSW4yuXglQiZykZmsydwjqHiaaBkh2PedDoYIY3RY
6OjdGV4ujmVHQc4dD1JAHzENa92YdcdMkyPKFaSbOWnIKvuZAaGLY0ypiNedY3FO
kfejzp1Eg5AOLSgXIGj4A6PnVpwF8j6g6SwgFUy+ccN23aoPT3lUPsgFpCQQLFpv
U2SdmCh1uLws6f87FBeKb+huaxxobnNscGcQgnvcACnqpscp6xaz12w+f7X+MM3J
4BpLFuA53X3fy5BCQ9JWqBjzlaoxl/dWRSNEUi3tO0z1pX/sYsZO7Xb3XFKm9Kig
bU94NdDaUiI8sisnwa2hFaZJ3p5YxsvxlNmA/NKHVjEGa7DUbnZOHU2kMW1yzg4P
pXM+Dzu/2o4rPTxt58ymTI2wdc0IH87g4M+lz0/IbrvYwNRYT+NxblsDTV33R0tp
5zuT0aagItt5O5nCM2abiocJSs5q9UvJZEj5KSffqaXdjkxH3Ri/lfSSQVlaa8zH
lgKI4oyXzJxQjHUFZfT4+Gaxk81r7ChioBZZX+MiUxSX8iPorpc3gfuU4pbm5F1O
WvVBri5xUZDGCS/Omg2nhTfKUd53wavsDRwFNiheVFlE7R6sxLM=
=kHFO
-----END PGP SIGNATURE-----


?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 69686@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 69686
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch