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#73766: 30.0.91; (documentation 'pcase) can take several seconds Date: Fri, 18 Oct 2024 16:42:32 -0400 Message-ID: References: <86msj9y8u2.fsf@gnu.org> <86cyjxopl2.fsf@gnu.org> <86msj1mf8m.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35477"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 73766@debbugs.gnu.org, yikai@z1k.dev, joaotavora@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 18 22:44:05 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 1t1tpM-00095s-Kf for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 18 Oct 2024 22:44:05 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t1tp1-0003Ht-6C; Fri, 18 Oct 2024 16:43:43 -0400 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 1t1toy-0003Hd-Fo for bug-gnu-emacs@gnu.org; Fri, 18 Oct 2024 16:43:41 -0400 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 1t1toy-0002hh-7h for bug-gnu-emacs@gnu.org; Fri, 18 Oct 2024 16:43:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=kK7IsYKhq3v0LXQq80ApCtjLqeGcRJ6vqMumuSUhDFM=; b=qayhm3EOkHAZKIeFyF1OUKI4eMiZkpRsXFbzL9Dj90UUVwzK/ZZLWu2gGRrQ1PPvilTytGKzu1upx7BYmRsxuTxl/AdFJ2P444No/SDFSpYmlfC2njFie795VL9taLxwu/s7ONI8yqDfnhW8lMIsBnCDPRQp7IhwGzREDHx6pjCM1qRJQHG9WjbdLplFfdZ/ZmL3EtJ46yHpsY+sa9clmR0XDhoDSdk6jwYydeWf0c+46UmuYaIY9vCyPAsT2a1IPDtfK3iab8TXWn0VuC4gpXxuMiSVGobsxaYtRlzLZgQv8pvQLqzk0kwXASZVCdCr148krtADvxR/ozmF/NTzjQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t1tpK-0003M0-HR for bug-gnu-emacs@gnu.org; Fri, 18 Oct 2024 16:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Oct 2024 20:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73766 X-GNU-PR-Package: emacs Original-Received: via spool by 73766-submit@debbugs.gnu.org id=B73766.172928419612821 (code B ref 73766); Fri, 18 Oct 2024 20:44:02 +0000 Original-Received: (at 73766) by debbugs.gnu.org; 18 Oct 2024 20:43:16 +0000 Original-Received: from localhost ([127.0.0.1]:40235 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t1toa-0003Kj-0t for submit@debbugs.gnu.org; Fri, 18 Oct 2024 16:43:16 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:6971) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t1toV-0003KR-9J for 73766@debbugs.gnu.org; Fri, 18 Oct 2024 16:43:14 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 909C31000C3; Fri, 18 Oct 2024 16:42:42 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1729284161; bh=VxlJi+XKFCa1tbmSP64tdJgH6qY6934MxI/cagEg4yU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=leCXrBZx2Cb20AClxWrRwxLxkNTNQYXdQEnaKZ7sYOP1HJnAl8DFhS0vb8gwu9enG ogqwQHG61Cezjz3+b7hqgEjYekxVdmiAIUayz4Dt0efjZ7NQkOhqRfCWkVAiz3oUVf wSzAjwQQetSlLwmoW4o925ltkH4lJtYPeVax9k0ZUQyU50rOQ+8mMwWlGgM5lPNns4 dXaJ/3n5dfmV7Oscf0eDSwZ8obPjtYulcNku6DOwpm5oM7NRmJ0rR8Dm0p5lyp+wVj U9bFpGqLYftDZy49qr0OMO9glslK9tXoT0zmOoEffEMHc9ufHVcuCLDZDLJrGFddDV 2npvvppd17fkQ== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id C6CAF10002E; Fri, 18 Oct 2024 16:42:41 -0400 (EDT) Original-Received: from alfajor (unknown [23.233.149.155]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A078E12077F; Fri, 18 Oct 2024 16:42:41 -0400 (EDT) In-Reply-To: <86msj1mf8m.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 18 Oct 2024 21:35:05 +0300") 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:293817 Archived-At: >> >> There's still a remaining performance issue for things like >> >> `eldoc-mode`, admittedly where we'd really want it to be instantaneous, >> >> but I think this should be fixed by making `eldoc` call `documentation` >> >> in a special way to skips those useless computations (eldoc just wants >> >> a "short doc" anyway). This affects other functions using the >> >> `function-documentation` property in a similar way. >> > Does it mean that this slowdown of eldoc was also caused by commit >> > 052c2ce0284c5193c9d6768a45a9b3508af51230, and if so, does the patch >> > you've shown previously (and which you consider not safe enough for >> > emacs-30) solve the eldoc slowdown as well? >> >> What I meant is that the 4s slowdown affects both `C-h f` and eldoc, >> and that the patch I sent which reduces it to 0.12s is IMO sufficient >> for the `C-h f` case but may still make Emacs feel occasionally a bit >> sluggish when eldoc hits this 0.12s. > > If the slowdown of eldoc is significant, maybe we will be better with > reverting the change which introduced the regression on emacs-30, > and then solving on master with your more thorough fix. The "quickfix" I installed on `emacs-30` should not suffer from a significant slowdown, no, so I think we're good for `emacs-30`. The "better" fix I installed on `master`, may still cause a bit of sluggishness with eldoc, OTOH. I think the "right" fix for that is to extend `documentation` or `C-h f` such that the `pcase` doc can distinguish between the (quick to generate) doc about `pcase` itself and the table of Pcase patterns defined with `pcase-defmacro` which is appended to the end of the `pcase` doc (and which can take a bit of time to generate but is not needed for eldoc). It would also be good to be able to show the table in a kind of abbreviated form (one line per Pcase pattern) with a way to unfold/refold specific patterns' doc. The same applies to the list of methods displayed in the doc of generic functions and in the doc of types. Stefan