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: Thu, 04 Aug 2022 09:40:15 +0300 Message-ID: <83h72s4ils.fsf@gnu.org> References: <8a3eaeef01be5bfaa5ef@heytings.org> <05388e8d8812bfa3695d@heytings.org> <83v8rf5894.fsf@gnu.org> <65cb7c73fd4a999cca00@heytings.org> <8c7321f2f3400a5db9be@heytings.org> <8c7321f2f388e5343475@heytings.org> <8c7321f2f36494299e61@heytings.org> <8c7321f2f336523624e3@heytings.org> <83r1202meh.fsf@gnu.org> <6020ffaf-9069-0070-76cf-a13379ef01b5@yandex.ru> <83les71ilg.fsf@gnu.org> <06c5560d-3009-e5a5-3d33-fe5d2ec32d6b@yandex.ru> <74ddc877f17a06d8f120@heytings.org> <83wnbq62sz.fsf@gnu.org> <74ddc877f1b7de1eaf91@heytings.org> <9a8f98b5-3943-be38-908a-3aad3f282ccb@yandex.ru> <68722578-414c-a0d9-57f2-21a0e6d74c0f@yandex.ru> <83k07p5ymu.fsf@gnu.org> <3e180c88-3ee8-7049-dc3f-88ae2636cfe1@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24126"; 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 Thu Aug 04 08:41:19 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 1oJUXl-00069C-OU for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Aug 2022 08:41:18 +0200 Original-Received: from localhost ([::1]:43916 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oJUXk-0001ay-9o for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Aug 2022 02:41:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60164) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJUXW-0001ak-AO for bug-gnu-emacs@gnu.org; Thu, 04 Aug 2022 02:41:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:32933) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oJUXW-0004dg-1r for bug-gnu-emacs@gnu.org; Thu, 04 Aug 2022 02:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oJUXV-0000C4-U0 for bug-gnu-emacs@gnu.org; Thu, 04 Aug 2022 02:41: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: Thu, 04 Aug 2022 06:41: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.1659595228670 (code B ref 56682); Thu, 04 Aug 2022 06:41:01 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 4 Aug 2022 06:40:28 +0000 Original-Received: from localhost ([127.0.0.1]:50910 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJUWx-0000Ag-K0 for submit@debbugs.gnu.org; Thu, 04 Aug 2022 02:40:28 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47118) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJUWw-0000AN-4Y for 56682@debbugs.gnu.org; Thu, 04 Aug 2022 02:40:26 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:34968) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJUWp-0004Wn-W3; Thu, 04 Aug 2022 02:40:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=Ohsf+KiKS8bA0MdJtsLDcaqgQKYbVV16+OEz763deHM=; b=cYdlDnS7OYz0MOBunarE lmZEAz7Jf83PwBcRDfsH7ZIml9bPD9k0nJhcXjx9KEsZyD4Y+b4CBnfoQVV/Mn2mbW/+4xQhmGfU/ B9tHYVf+3V2MQLzuQ5Z69R/HcJKkwq8N5gDmB9HW218rGjMwl/Od9KS/oX1Vk4K48UylVk1aXZwO9 AG5bzBN3efHB3SlIYvK0TEw8PpvOA3NvGhpzVLo+AW+DWjCmjtmz7p7j3gMcEuwIS5Kk56A94fikh H5l1pfje33cZG84SphtflSgiwX5bvnETsI/xFtprG8hYdvRNpSVzZ23gN+Phy9tW+MPVumwNgEeaA h7cC8UHukDrD3Q==; Original-Received: from [87.69.77.57] (port=4858 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 1oJUWp-0000In-8L; Thu, 04 Aug 2022 02:40:19 -0400 In-Reply-To: <3e180c88-3ee8-7049-dc3f-88ae2636cfe1@yandex.ru> (message from Dmitry Gutov on Thu, 4 Aug 2022 04:08:20 +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:238683 Archived-At: > Date: Thu, 4 Aug 2022 04:08:20 +0300 > Cc: 56682@debbugs.gnu.org, gregory@heytings.org, monnier@iro.umontreal.ca > From: Dmitry Gutov > > On 03.08.2022 14:56, Eli Zaretskii wrote: > >> Date: Wed, 3 Aug 2022 03:26:02 +0300 > >> From: Dmitry Gutov > >> Cc:56682@debbugs.gnu.org,monnier@iro.umontreal.ca > >> > >> On 03.08.2022 03:00, Dmitry Gutov wrote: > >>> On 02.08.2022 19:19, Gregory Heytings wrote: > >>>>>> Try to open the dictionary.json with Emacs on master a month ago. > >>>>> I believe it can also be done with the current master, just after > >>>>> setting long-line-threshold to the nil value.  Right? > >>>>> > >>>> Indeed.  With master from one month ago it's even more crystal-clear > >>>> that you see the statu quo ante. > >>> If I set long-line-threshold to nil, does that also disable the > >>> redisplay optimizations related to long lines? > >>> > >>> Ones that caused scrolling delays even after the buffer has been fully > >>> fontified. > >> I mean those that*fixed* the said scrolling delays, of course. > > I don't think I understand which changes you had in mind (could you > > give a less vague pointer?), but I think the answer is NO: that > > variable disables only the recent changes related to long lines. > > I'm not sure if there are separate/specific changes to speak of (sorry, > I'm flying blind), but previously I remarked in this discussion that on > master pushing C-p can still result in sluggish response (at the end of > a long line), even after the current window has been fontified (meaning > font-lock has finished its work), and Gregory remarked that I should try > the branch feature/long-lines-and-font-locking where this was fixed. > > I did try the branch and indeed did not experience that sluggishness > anymore. But that probably is a separate issue from slow font-lock. > > So to try to debug any remaining speed issues with font-lock, it would > be great to eliminate other sources of slow display first. In particular > ones coming from a low-level subsystem I cannot as easily > benchmark/debug/etc as Lisp code. > > The setting > > (setq long-line-threshold nil syntax-wholeline-max most-positive-fixnum) > > indeed makes all the speed issues come back, including the > aforementioned sluggishness. OK, so I guess my answer to your question was accurate, and you now have a way to reproduce those issues by disabling the recent speedups. The changes in what was the long-lines-and-font-locking branch are now on master, AFAIK.