GNU bug report logs - #68072
pp functions have O(n^2) runtime with lisp-indent-function set to common-lisp-indent-function

Previous Next

Package: emacs;

Reported by: Brennan Vincent <brennan <at> umanwizard.com>

Date: Thu, 28 Dec 2023 00:11:02 UTC

Severity: normal

Full log


Message #26 received at 68072 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: João Távora <joaotavora <at> gmail.com>
Cc: Brennan Vincent <brennan <at> umanwizard.com>, 68072 <at> debbugs.gnu.org
Subject: Re: bug#68072: pp functions have O(n^2) runtime with
 lisp-indent-function set to common-lisp-indent-function
Date: Sun, 07 Jan 2024 00:07:24 -0500
>> So in the mean time, maybe the patch below is in order?
>> João, any comment?
>
> Maybe, I think so.

OK, pushed, thanks.

> Though the starting premise of this bug:
>> 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.
> Is not true anymore, starting around the time Brennan opened it.
> Eglot now uses JSON by default, which should solve most of the
> performance  issues related to logging.

I assumed that Brennan had changed the format to `lisp`.

> But Lisp pp is still opt-in, and making it faster (and relatively
> pretty) is a good thing.

The `pp` code would really benefit from extra info about what kind of
"pp" is desired (are we prettifying ELisp code or just some arbitrary
data?  Do we really want to be pretty for a human reader or do we just
want something printed quickly but a bit more manageable than a single
super-long line?).


        Stefan





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.