From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: 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 Message-ID: References: <875y0jw5jf.fsf@prescott.mail-host-address-is-not-set> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34972"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Brennan Vincent , 68072@debbugs.gnu.org To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 07 06:08:26 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rMLOc-0008u2-Jh for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Jan 2024 06:08:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMLOB-0007Lv-Bn; Sun, 07 Jan 2024 00:07:59 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rMLO9-0007L8-Nq for bug-gnu-emacs@gnu.org; Sun, 07 Jan 2024 00:07:57 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMLO9-0006x7-FL for bug-gnu-emacs@gnu.org; Sun, 07 Jan 2024 00:07:57 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rMLOE-0002he-Du for bug-gnu-emacs@gnu.org; Sun, 07 Jan 2024 00:08:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Jan 2024 05:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68072 X-GNU-PR-Package: emacs Original-Received: via spool by 68072-submit@debbugs.gnu.org id=B68072.170460407710379 (code B ref 68072); Sun, 07 Jan 2024 05:08:02 +0000 Original-Received: (at 68072) by debbugs.gnu.org; 7 Jan 2024 05:07:57 +0000 Original-Received: from localhost ([127.0.0.1]:60549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rMLO8-0002hL-Jr for submit@debbugs.gnu.org; Sun, 07 Jan 2024 00:07:56 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:31156) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rMLO5-0002h7-Sc for 68072@debbugs.gnu.org; Sun, 07 Jan 2024 00:07:55 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id EA20110009E; Sun, 7 Jan 2024 00:07:42 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1704604057; bh=MKLRs2ZmfuT8F4pkk1I6DrhoE24EeSeHjen/DTo3W2M=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Vp07oc9+7I5tT5eS0kWR9mHPq4KIP0iC6RqNwt0NeNe49t7SjmYPnGm9csiD+BHkc Zjj4ulHhd4CeK2D1eLJP0BbJHjFEKy+85wA/wmWUSYHCeQX9GD6LNy2yzARjaHcpr5 kzha3AciI70D058Nvz9WPyjkOtm2/g58o+Qg1GVK/PuS8VSEje4AvqcdcKnWpO3zZg ch7zxot4j157BjED2bhW0b7aH3QhXNDWJUz14G63sb0WpVRMEsjpGhRet91FMO1Q86 XkLXuDfWgLyb3JlSoAPrnI5GW4Rqo7Eb9j1cWcni07uJqwxUKVktN4HwDJNCE0dmXn crC+7sFQyEBIQ== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 6A90710004C; Sun, 7 Jan 2024 00:07:37 -0500 (EST) Original-Received: from pastel (65-110-221-238.cpe.pppoe.ca [65.110.221.238]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 31C12120BBF; Sun, 7 Jan 2024 00:07:37 -0500 (EST) In-Reply-To: ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Fri, 5 Jan 2024 13:06:30 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:277491 Archived-At: >> So in the mean time, maybe the patch below is in order? >> Jo=E3o, 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 amount= s 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