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: Mon, 01 Aug 2022 16:13:28 +0300 Message-ID: <83h72w2jk7.fsf@gnu.org> References: <83zggwcby5.fsf@gnu.org> <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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23629"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, 56682@debbugs.gnu.org, larsi@gnus.org, monnier@iro.umontreal.ca To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 01 15:33:48 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 1oIVYK-0005zJ-3N for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Aug 2022 15:33:48 +0200 Original-Received: from localhost ([::1]:49304 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIVYJ-0004QM-6p for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Aug 2022 09:33:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56976) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIVFC-0000kY-MB for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 09:14:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49953) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oIVFC-0007c2-CX for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 09:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oIVFC-00033k-7b for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 09:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Aug 2022 13:14: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.165935962611729 (code B ref 56682); Mon, 01 Aug 2022 13:14:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 1 Aug 2022 13:13:46 +0000 Original-Received: from localhost ([127.0.0.1]:39702 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIVEv-000336-VP for submit@debbugs.gnu.org; Mon, 01 Aug 2022 09:13:46 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:44014) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIVEu-00032s-En for 56682@debbugs.gnu.org; Mon, 01 Aug 2022 09:13:44 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:49176) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIVEp-0007aQ-7P; Mon, 01 Aug 2022 09:13:39 -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=9+Ef8WuBZFC4slBy5APYNHnpRMc9yzW58p3UwVi7SGA=; b=k+8I4BVLOtMh Yqkkv8e886KYLwY6F7mKDiRTf5NrqozmzBgyvNCEVB1T1tunzrYqyxxuKpUD9NHWQxIht1CgDWZxK +yVbh/MBwHwzNpGeH7oPeSlvKfbDYb20DbeyW17LZxN1lfQm3WinFU7L49z0k89qX7vSer4NJk6Dx +GL0T1leJyDRr631Z88vPFJoV7ULGoM2erOXYxFr4hfoRT9kB7EpUT/haT/Nz1P2/8IL9KzHeqR1J UlfCQYVwcGrR9ZX52FtqifdUy5BiEWnFJSDLmtHVTQ6wti3KViI/7p2mS83/+NNT9Md4ghCwURDog JVKxhavw7G/6xf4IsvAc4g==; Original-Received: from [87.69.77.57] (port=2349 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 1oIVEo-00046K-NL; Mon, 01 Aug 2022 09:13:39 -0400 In-Reply-To: (message from Gregory Heytings on Mon, 01 Aug 2022 12:51:47 +0000) 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:238433 Archived-At: > Date: Mon, 01 Aug 2022 12:51:47 +0000 > From: Gregory Heytings > cc: gerd.moellmann@gmail.com, 56682@debbugs.gnu.org, larsi@gnus.org, > monnier@iro.umontreal.ca > > > Which means, for example, that tests like this: > > > > if (current_buffer->long_line_optimizations_p) > > { > > if (!it->narrowed_begv <<<<<<<<<<<<<<<<<<<<<<<<<< > > || ((pos.charpos < it->narrowed_begv || pos.charpos > it->narrowed_zv) > > && (!redisplaying_p || it->line_wrap == TRUNCATE))) > > > > are not necessarily reliable, because we never initialize narrowed_begv > > to zero, AFAICT. Right? > > > > Indeed. That wasn't a problem with the previous code in which > narrowed_begv was unconditionally assigned. Now it is. I think the > following change should be enough to fix this. Agreed? Yes, of course.