From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.bugs Subject: bug#56682: feature/improved-locked-narrowing 9dee6df39c: Reworked locked narrowing. Date: Tue, 31 Jan 2023 15:14:14 +0000 Message-ID: <94821a0ef100102ac9e0@heytings.org> References: <166939872890.18950.12581667269687468681@vcs2.savannah.gnu.org> <20221125175209.51166C004B6@vcs2.savannah.gnu.org> <6c9d91cffc1bfd801530@heytings.org> <6c9d91cffc394613f58a@heytings.org> <83eds0ksev.fsf@gnu.org> <8aadf0ddd54c85c8144a@heytings.org> <831qnhg3d9.fsf@gnu.org> <9757fbea37611e9c44b9@heytings.org> <83cz6yacxt.fsf@gnu.org> <6943e04e30e5a02a52e6@heytings.org> <838rhk5fy1.fsf@gnu.org> <6943e04e30a40824e107@heytings.org> <83k0143q37.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33668"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56682@debbugs.gnu.org, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 31 16:15:21 2023 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 1pMsLw-0008Uw-NZ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 31 Jan 2023 16:15:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMsLj-0007ry-DU; Tue, 31 Jan 2023 10:15:10 -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 1pMsLe-0007jO-MS for bug-gnu-emacs@gnu.org; Tue, 31 Jan 2023 10:15:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pMsLe-0004mQ-Cw for bug-gnu-emacs@gnu.org; Tue, 31 Jan 2023 10:15:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pMsLe-0002GB-7L for bug-gnu-emacs@gnu.org; Tue, 31 Jan 2023 10:15:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 31 Jan 2023 15:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56682 X-GNU-PR-Package: emacs Original-Received: via spool by 56682-submit@debbugs.gnu.org id=B56682.16751780598612 (code B ref 56682); Tue, 31 Jan 2023 15:15:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 31 Jan 2023 15:14:19 +0000 Original-Received: from localhost ([127.0.0.1]:54679 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pMsKw-0002Ep-SJ for submit@debbugs.gnu.org; Tue, 31 Jan 2023 10:14:19 -0500 Original-Received: from heytings.org ([95.142.160.155]:37952) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pMsKu-0002EU-25 for 56682@debbugs.gnu.org; Tue, 31 Jan 2023 10:14:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1675178054; bh=Ay4GhUq/N6DBGfuT51C5r7Pnrmn78D2MenIghBye0XY=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=pPfH1FZrr1fhvJSPCr83BdZ+1ZzMTfYDXkvQSlRC2G1fTpSongGZvfTOALDRzODrU tqMHq07bdbSZ0p0/6UgAX7CU+7272iTsextIbSfRUF+jt9pPv/CtdBwWn1sHe7Yvrj 1lFDoNgy+Ovob6rAzGl2KKaEa+qtyuVI+J5ButtvP5a0mK4k1DWlGtUvLgaOOjs43Q UyZ7VaWxZPLFS8tUVkHkt1lsrh2aI+9VyO8inpsRFqTQkO6X5S2PEaIZiqdkvbWFQ7 u53f4Dk/xYU24gR1bPw1kET4clRU8pZWqa+CKfrekPOJlBnxa32tsRIaMWQegrEQEU dKhOrg/FdvnXQ== In-Reply-To: <83k0143q37.fsf@gnu.org> 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:254528 Archived-At: > > So we are removing all the stuff that prevented font-lock from slowing > down redisplay when long lines are in the buffer? IOW, something which > we have for several months, and which so far brought up only one > complaint? Frankly, this makes no sense to me, unless we delay the > pretest for another half year or so. It's too late for such changes. > > Or am I missing something? > I looked with a critical eye at the code I wrote, and concluded that the cure is worse than the disease. It's true that some slowdowns caused by font-locking are prevented by locked narrowing, but: 1. The slowdowns caused by font-locking were not the major cause of slowdowns in buffers with long lines. They were the "last step" to make editing operations in such buffers as fast as possible, and my opinion now is that that last step was a step too far. Efficiency issues in font locking routines are the responsibility of mode authors. Efficiency issues in the redisplay routines are the responsibility of Emacs, and have been dealt with. 2. Locked narrowing does not prevent all slowdowns caused by font-locking. 3. Locked narrowing can create slowdowns (e.g. infinite loops) that do not exist when it is not present. 4. Mode authors who do care about efficiency will update their modes to deal with problematic buffers, and do not need to be incited by locked narrowing to do so. 5. Mode authors who do not care about such problematic buffers will simply replace calls to "(widen)" by "(narrowing-unlock 'fontification-functions) (widen)" in their code, and the situation will not have improved.