From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#56682: Fix the long lines font locking related slowdowns Date: Fri, 05 Aug 2022 17:20:56 +0300 Message-ID: <83r11uzs8n.fsf@gnu.org> References: <837d46mjen.fsf@gnu.org> <8a3eaeef01be5bfaa5ef@heytings.org> <05388e8d8812bfa3695d@heytings.org> <83v8rf5894.fsf@gnu.org> <65cb7c73fd4a999cca00@heytings.org> <8c7321f2f3400a5db9be@heytings.org> <8c7321f2f388e5343475@heytings.org> <8c7321f2f36494299e61@heytings.org> <83v8rc2n1h.fsf@gnu.org> <64084296-1953-8ef8-5938-adfb6fb9b43f@yandex.ru> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27091"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56682@debbugs.gnu.org, gregory@heytings.org, monnier@iro.umontreal.ca To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 05 16:22:17 2022 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 1oJyDR-0006rF-1Z for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Aug 2022 16:22:17 +0200 Original-Received: from localhost ([::1]:55238 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oJyDP-0004X1-NW for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Aug 2022 10:22:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJyDC-0004V6-La for bug-gnu-emacs@gnu.org; Fri, 05 Aug 2022 10:22:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42220) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oJyDB-0005xM-Vf for bug-gnu-emacs@gnu.org; Fri, 05 Aug 2022 10:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oJyDB-00040m-R3 for bug-gnu-emacs@gnu.org; Fri, 05 Aug 2022 10:22:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Aug 2022 14:22:01 +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.165970926415328 (code B ref 56682); Fri, 05 Aug 2022 14:22:01 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 5 Aug 2022 14:21:04 +0000 Original-Received: from localhost ([127.0.0.1]:60202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJyCG-0003zA-HF for submit@debbugs.gnu.org; Fri, 05 Aug 2022 10:21:04 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33094) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJyCE-0003yL-9l for 56682@debbugs.gnu.org; Fri, 05 Aug 2022 10:21:02 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37720) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJyC8-0005kr-SF; Fri, 05 Aug 2022 10:20:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=lo/cVmbCDhi0JfcyUVPxgvxS3laacRn+WCfdLqzmf60=; b=p5mwPPB65tcr zETVk72NumtJg/LH5jTuuw3M9A/joda2dFukBi72Y/zy6rzZ1h5P8HUf6PcTN9UzPbgKzsjHOwNlR EHWE9L8uqSFLvdO3JhjiQpuEfI8R9Sy6OJw908lNfA95wT4S4xG+w47+x8UnCtWpqO8eld+5bQW84 xHA6rjxkUOQ/IW2nYDomciSos4MLMvK0Rj3HmIVDBgqqy7dizz3iWrype7/nze0ZtBsKCYRwpJS2S 72OS4TzBh4Ym2KqXWATTKhQTStLhOx141ckH7ZyX0qTMiaC4aCoGm6hMXQbFFJNlRhFWKWEpmw5R3 UUMHkUh7dSD1qJAuTT8pJg==; Original-Received: from [87.69.77.57] (port=2149 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJyC8-00041Y-BT; Fri, 05 Aug 2022 10:20:56 -0400 In-Reply-To: <64084296-1953-8ef8-5938-adfb6fb9b43f@yandex.ru> (message from Dmitry Gutov on Fri, 5 Aug 2022 15:59:57 +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" Xref: news.gmane.io gmane.emacs.bugs:238922 Archived-At: > Date: Fri, 5 Aug 2022 15:59:57 +0300 > Cc: 56682@debbugs.gnu.org, gregory@heytings.org > From: Dmitry Gutov > > On 01.08.2022 14:58, Eli Zaretskii wrote: > > > As I wrote elsewhere, I'm okay with extending 'widen' so that it could > > "unlock" the locked narrowing, which could then be used in major modes > > that convince us their performance is adequate (or clearly announce in > > their docs that they don't care about files with long lines ;-). > > And to address the idea of "unlocking" the narrowing: I think I have > demonstrated that the remaining slowdown can be caused purely by the > length of the buffer and how long 'parse-partial-sexp' takes to parse > it. No, you haven't demonstrated that. > And of course the more, let's say, *complex* modes like CC Mode will opt > for unlocking narrowing right away because its font-lock logic has to > jump around to previously-saved positions in its syntax cache, which > will inevitably spam errors here and there when those positions are not > accessible. CC Mode is extremely unlikely to happen in files with such long lines, so what it does is largely irrelevant to this discussion.