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: Fix the long lines font locking related slowdowns Date: Mon, 01 Aug 2022 13:38:40 +0000 Message-ID: References: <83o7xccagi.fsf@gnu.org> <831qu7daxb.fsf@gnu.org> <83sfmnb7yg.fsf@gnu.org> <837d3ybh5z.fsf@gnu.org> <136c4fe0fc74196714aa@heytings.org> <83pmhp89ov.fsf@gnu.org> <136c4fe0fc39573addc9@heytings.org> <83k07x8738.fsf@gnu.org> <136c4fe0fcdf00ef9a11@heytings.org> <83h73183r7.fsf@gnu.org> <136c4fe0fc0fceb0d752@heytings.org> <838roc8ka7.fsf@gnu.org> <83tu706obt.fsf@gnu.org> <83h7306ifa.fsf@gnu.org> <83edy37pul.fsf@gnu.org> <83pmhn55sk.fsf@gnu.org> <65cb7c73fdc753518d35@heytings.org> <83fsii68o3.fsf@gnu.org> <65cb7c73fdf6704d19d5@heytings.org> <835yje62vz.fsf@gnu.org> <83r1214uz5.fsf@gnu.org> <8c7321f2f39b7a28dd18@heytings.org> <83o7x42l64.fsf@gnu.org> <83edy02j2n.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="yoMSEx8ODB" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9574"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, 56682@debbugs.gnu.org, larsi@gnus.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 Mon Aug 01 15:53:56 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 1oIVrm-0002E2-Mj for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Aug 2022 15:53:54 +0200 Original-Received: from localhost ([::1]:53728 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIVrl-0002GP-Mk for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Aug 2022 09:53:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34778) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIVdR-0001Vy-Jv for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 09:39:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50028) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oIVdN-0003vB-Nk for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 09:39:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oIVdN-0005vD-Jn for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 09:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Aug 2022 13:39: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.165936112322736 (code B ref 56682); Mon, 01 Aug 2022 13:39:01 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 1 Aug 2022 13:38:43 +0000 Original-Received: from localhost ([127.0.0.1]:39777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIVd5-0005ue-J4 for submit@debbugs.gnu.org; Mon, 01 Aug 2022 09:38:43 -0400 Original-Received: from heytings.org ([95.142.160.155]:33882) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIVd4-0005uU-Jo for 56682@debbugs.gnu.org; Mon, 01 Aug 2022 09:38:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1659361121; bh=8cFov/5VmUukWJaLDXhKaxye1EfLIm6/9NxzGdIJse0=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=vvPWS37pEta5EJQfuKb4UFxmdsmSMyaJGSrTp8WleeC564XYw/B/a6ZEsLBCgSRPR bt3uYWUkYVfK4Dzf2wwbjr9eVwAN8QT+3KXEdnnyIwAYand+BK8PleLry9MKZNwi9f CY+QTcmAIEajkJYTI1q7egB6GxICxPhq89VW3LA0oEkWzi4ScRcP7ZbU09d0Vns5df BF3AUNZywiyy5wR79dn+GLsYHQdusnBkOo8h5WlW4FLcKiDAJVDjeN1nqVN3+T0P4y n9eqKXMVkrOzsU75x25JJU2K8VONMfLBb39z4a24coqQudJNRqaooqVZbZpUkVaJXd uiUGb1R93C4+w== In-Reply-To: <83edy02j2n.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" Xref: news.gmane.io gmane.emacs.bugs:238441 Archived-At: --yoMSEx8ODB Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable >> diff --git a/src/xdisp.c b/src/xdisp.c >> index 8a19b3bda9..9574d06bd5 100644 >> --- a/src/xdisp.c >> +++ b/src/xdisp.c >> @@ -3472,6 +3472,9 @@ init_iterator (struct it *it, struct window *w, >> &it->bidi_it); >> } >> >> + if (current_buffer->long_line_optimizations_p) >> + it->narrowed_begv =3D 0; >> + > > Sorry, I wrote that this is OK, but it isn't: if init_iterator is called= =20 > with 'struct it' that was already initialized by a previous call to=20 > 'reseat', the above will nuke the narrowing. > > So we need something more complicated. ATM I don't see how to solve=20 > this without manually initializing narrowed_begv before the first call=20 > to init_iterator or start_display. Hmm... > Hmmm... So I wasn't completely wrong when I wasn't sure it was TRT =F0=9F= =98=89=20 It's a chicken-and-egg problem. On the other hand, even if we nuke the=20 narrowing there, it will be recomputed two lines later, which should be=20 okay. --yoMSEx8ODB--