GNU bug report logs -
#68072
pp functions have O(n^2) runtime with lisp-indent-function set to common-lisp-indent-function
Previous Next
Full log
View this message in rfc822 format
> And Eglot should probably use a faster pretty printer than the default
> `pp` for that. Maybe we should make `lisp-data-mode` set
> `pp-default-function` or `lisp-indent-function` to avoid such problems?
Jsonrpc uses the pretty printer via `pp-to-string` so there's no major
mode to change (and `pp-to-string` isn't told whether it's printing code
or data 🙁), and in order to run on older Emacsen it can't really use
the `pp-function` argument either.
So in the mean time, maybe the patch below is in order?
João, any comment?
Stefan
diff --git a/lisp/jsonrpc.el b/lisp/jsonrpc.el
index 3f33443f321..f0f5842a0ee 100644
--- a/lisp/jsonrpc.el
+++ b/lisp/jsonrpc.el
@@ -1011,7 +1010,9 @@
(format "%s%s" preamble
(or (and foreign-message
+ (let ((lisp-indent-function ;bug#68072
+ #'lisp-indent-function))
(concat "\n" (pp-to-string
- foreign-message)))
+ foreign-message))))
(concat log-text "\n")))))))
(goto-char (point-max))
This bug report was last modified 1 year and 160 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.