all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#68072: pp functions have O(n^2) runtime with lisp-indent-function set to common-lisp-indent-function
@ 2023-12-28  0:10 Brennan Vincent
  2023-12-28  6:23 ` Eli Zaretskii
  2023-12-28  7:20 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 2 replies; 8+ messages in thread
From: Brennan Vincent @ 2023-12-28  0:10 UTC (permalink / raw)
  To: 68072

This also causes eglot (in its default configuration) to hang when
opening large Rust files, since rust-analyzer tends to send large amounts of
inlay hints, and eglot logs the messages it receives as pretty-printed
lisp objects.

Note the times in the comments here, showing clearly quadratic behavior:

(setq lisp-indent-function  'common-lisp-indent-function)

(defun bm1 (sz)
  (car
   (benchmark-run (progn (setq p (pp-to-string (make-list sz 'foo))) nil))))

(bm1 1000) ;; 0.057078079
(bm1 2000) ;; 0.22562238599999998
(bm1 10000) ;; 5.312058368
(bm1 20000) ;; 21.00088354







^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-01-07  5:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-28  0:10 bug#68072: pp functions have O(n^2) runtime with lisp-indent-function set to common-lisp-indent-function Brennan Vincent
2023-12-28  6:23 ` Eli Zaretskii
2023-12-28  7:20 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-28 15:37   ` Brennan Vincent
2023-12-28 17:10   ` Stefan Kangas
2024-01-05  3:50   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-05 13:06     ` João Távora
2024-01-07  5:07       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.