GNU bug report logs - #58687
29.0.50; Enabling pp-use-max-width dramatically slows down formatting of large sexps like org-persist--index

Previous Next

Package: emacs;

Reported by: Michael Eliachevitch <m.eliachevitch <at> posteo.de>

Date: Fri, 21 Oct 2022 13:38:02 UTC

Severity: normal

Found in version 29.0.50

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ihor Radchenko <yantar92 <at> posteo.net>
Cc: 58687 <at> debbugs.gnu.org, m.eliachevitch <at> posteo.de
Subject: bug#58687: 29.0.50; Enabling pp-use-max-width dramatically slows down formatting of large sexps like org-persist--index
Date: Thu, 12 Jan 2023 18:39:35 +0200
> From: Ihor Radchenko <yantar92 <at> posteo.net>
> Cc: m.eliachevitch <at> posteo.de, 58687 <at> debbugs.gnu.org
> Date: Thu, 12 Jan 2023 16:19:37 +0000
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >        40041  85%            - pp
> >        40041  85%             - pp-to-string
> >        40041  85%              - pp-emacs-lisp-code
> >        40028  85%               - pp--insert-lisp
> >        40028  85%                - pp--format-list
> >        40028  85%                 - pp--insert
> >        38710  82%                  - pp--insert-lisp
> >        38710  82%                   - pp--format-list
> 
> So, the current `pp' implementation is re-parsing from bob for every
> nested list inside sexp.

Not "the current 'pp'", but the implementation for this optional
behavior.

> This is quadratic scaling, and, as the repro demonstrates, the time
> goes up very quickly. Is the new option usable at all in practice?

Maybe only for small code fragments.




This bug report was last modified 2 years and 211 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.