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 20:08:00 +0300 Message-ID: <83v8rb28pb.fsf@gnu.org> References: <831qtz3ot7.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4676"; 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 19:11:23 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 1oIYws-00011B-7b for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Aug 2022 19:11:22 +0200 Original-Received: from localhost ([::1]:42454 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIYwr-0005Hk-9Q for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Aug 2022 13:11:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56240) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIYuc-00033K-Gf for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 13:09:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51787) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oIYuc-0004hk-7l for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 13:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oIYub-0006KD-U1 for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 13:09: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: Mon, 01 Aug 2022 17:09: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.165937369824254 (code B ref 56682); Mon, 01 Aug 2022 17:09:01 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 1 Aug 2022 17:08:18 +0000 Original-Received: from localhost ([127.0.0.1]:41536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIYtu-0006J8-4M for submit@debbugs.gnu.org; Mon, 01 Aug 2022 13:08:18 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:43080) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIYts-0006It-K2 for 56682@debbugs.gnu.org; Mon, 01 Aug 2022 13:08:17 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:54272) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIYtn-0004b8-3J; Mon, 01 Aug 2022 13:08:11 -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=bQQePsSnXM2BcNZWV8uXYJ4sC+vpWuMPyL1McD3EV/0=; b=hXizp5WYs4c9 +p3PFHgVm9CagNlVRzF5Tm+j1MEDMTgK1xyg4KlJBmBrJXDYYtY/h6J9uMWtyYaihcyoZGxsMPlF5 4S5sCXmAF/PVJuF5xxmGNVp2CPMAV1I04oM6nCRSvShWwJ48qK/sbIe4u0MUDFXaJi/dxPivonyMH s/LmdNR77IP8tgwx5WiJCIGtIGjVe1znccQc1hdmgzVo3qjILtlruHgpZpfCExh/BQFl8XOU8XFh+ tONSU5hs8ephddhlTmOXT06WQBjldo4+86BkJ4W+kgwgyFtVmbb31IQ03/gaNWjt9ipTY5vPbpKve ixBb8BEffCAXSD02eebj8Q==; Original-Received: from [87.69.77.57] (port=4990 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 1oIYtm-00060q-Gb; Mon, 01 Aug 2022 13:08:10 -0400 In-Reply-To: (message from Gregory Heytings on Mon, 01 Aug 2022 16:49:55 +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:238453 Archived-At: > Date: Mon, 01 Aug 2022 16:49:55 +0000 > From: Gregory Heytings > cc: gerd.moellmann@gmail.com, 56682@debbugs.gnu.org, larsi@gnus.org, > monnier@iro.umontreal.ca > > > Can you explain which, if any, problems you saw or had in mind, and what > > and how did you want to fix them with this particular hunk? I'd then > > suggest a better change (or agree with your change, in case I missed > > something). > > You're correct, now that I think again about this, it was just wrong. > Fixed. OK, thanks. But anyway: the possibly slow part there is not find_newline_no_quit, it's the loop that calls bidi_move_to_visually_next afterwards, in case the newline is very far back. So if we ever want to make that part faster, we should force that loop to start from narrowed_begv, not from where we find the previous newline.