From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#53749: 29.0.50; [PATCH] Xref backend for TeX buffers Date: Tue, 7 May 2024 05:27:14 +0300 Message-ID: References: <2c5c8afa-b57e-3156-d21c-5523cacb4d87@yandex.ru> <831qf1mgjl.fsf@gnu.org> <87cyyj9rpp.fsf@gnu.org> <65793.1694843596@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31123"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 53749@debbugs.gnu.org, Ikumi Keita , Arash Esbati , stefankangas@gmail.com, Tassilo Horn , Eli Zaretskii To: Stefan Monnier , David Fussner Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 07 04:27:55 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 1s4AYc-0007sX-5W for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 May 2024 04:27:54 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4AYO-00043T-8W; Mon, 06 May 2024 22:27:41 -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 1s4AYM-00042k-HB for bug-gnu-emacs@gnu.org; Mon, 06 May 2024 22:27:38 -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 1s4AYM-0002nv-9C for bug-gnu-emacs@gnu.org; Mon, 06 May 2024 22:27:38 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s4AYk-0002RI-Bp for bug-gnu-emacs@gnu.org; Mon, 06 May 2024 22:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 May 2024 02:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53749 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: pending patch Original-Received: via spool by 53749-submit@debbugs.gnu.org id=B53749.17150488779369 (code B ref 53749); Tue, 07 May 2024 02:28:02 +0000 Original-Received: (at 53749) by debbugs.gnu.org; 7 May 2024 02:27:57 +0000 Original-Received: from localhost ([127.0.0.1]:41549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4AYf-0002R3-5j for submit@debbugs.gnu.org; Mon, 06 May 2024 22:27:57 -0400 Original-Received: from forward500c.mail.yandex.net ([2a02:6b8:c03:500:1:45:d181:d500]:45106) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4AYd-0002Qv-Eh for 53749@debbugs.gnu.org; Mon, 06 May 2024 22:27:56 -0400 Original-Received: from mail-nwsmtp-smtp-production-main-44.sas.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-44.sas.yp-c.yandex.net [IPv6:2a02:6b8:c24:a33:0:640:d837:0]) by forward500c.mail.yandex.net (Yandex) with ESMTPS id 8436F60E46; Tue, 7 May 2024 05:27:23 +0300 (MSK) Original-Received: by mail-nwsmtp-smtp-production-main-44.sas.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id IRNiAUGmFmI0-NGNjqMW7; Tue, 07 May 2024 05:27:22 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1715048842; bh=7QePmLdLH9IzEey+MJrYO14uvacfm2qSLhMar6lTCqk=; h=In-Reply-To:From:Subject:Message-ID:Cc:References:Date:To; b=QPcpdv2htzt/OJntg3iN1NbUbtexvLRCCjWbgczWDbZr14fbz3StkiwQCUWrN6+CI dfmHiBJ+1exOke9JUJKLCjb9FoZm8K3RxGjnWtUX3r4QSkz6AqJ/0pfcUrb3rHXMrt UPMOxa+x4BTD45oHsz9tvRxao9uFzMbB3T+2xh4k= Authentication-Results: mail-nwsmtp-smtp-production-main-44.sas.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Original-Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfauth.nyi.internal (Postfix) with ESMTP id 1C9BF120006B; Mon, 6 May 2024 22:27:17 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Mon, 06 May 2024 22:27:18 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvddvjedgieduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegughhuthhovheshigrnhguvgigrdhruheqnecuggftrfgrth htvghrnhepiefhjeeuveetffffvdefteffffekhfeuudejieehheeiudelgfehgffffedu ffdunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hguhhtohhvodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqddufeeffeelleeh hedvqddvleegjeejjeejiedqughguhhtohhvpeephigrnhguvgigrdhruhesfhgrshhtmh grihhlrdgtohhm X-ME-Proxy: Feedback-ID: ib1d9465d:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 6 May 2024 22:27:15 -0400 (EDT) Content-Language: en-US In-Reply-To: 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:284618 Archived-At: On 03/05/2024 16:42, Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote: >> Thanks for looking over the patch. Here's the recipe for the purported >> bug in xref.el: > The problem stems from xref.el's constant abuse of > `inhibit-modification-hooks`. Binding this var to t should be done only > in exceptional circumstances and should ideally be accompanied by a > comment explaining why it's necessary. Well, the reason is performance: I've tried to wring out the most out of it, given that we have to parse the buffer for syntax in Elisp, and that'll always have a certain overhead. The difference between inhibiting and not could be up to 20% of runtime. David's fix makes things slower (just due to having us do the necessary work), but still has an edge over having no inhibit-modification-hooks. That remaining improvement is around 4-7% in my testing, though, so maybe it's the point where we should prioritize simplicity.