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, 22 Jul 2022 17:51:33 +0300 Message-ID: <83o7xhjj4a.fsf@gnu.org> References: <837d46mjen.fsf@gnu.org> <174616cd5c33bfc14b1f@heytings.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37652"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56682@debbugs.gnu.org To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 22 16:52:16 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 1oEu0m-0009d3-G5 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 22 Jul 2022 16:52:16 +0200 Original-Received: from localhost ([::1]:48550 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oEu0l-0006eZ-3T for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 22 Jul 2022 10:52:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33826) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEu0Y-0006cr-7M for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2022 10:52:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52380) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oEu0X-0004Pu-Ug for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2022 10:52:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oEu0X-0006Nn-PK for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2022 10:52: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, 22 Jul 2022 14:52: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.165850150924517 (code B ref 56682); Fri, 22 Jul 2022 14:52:01 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 22 Jul 2022 14:51:49 +0000 Original-Received: from localhost ([127.0.0.1]:42129 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEu0L-0006NM-8a for submit@debbugs.gnu.org; Fri, 22 Jul 2022 10:51:49 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49062) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEu0F-0006N3-KV for 56682@debbugs.gnu.org; Fri, 22 Jul 2022 10:51:46 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:44388) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEu09-0004MV-Vd; Fri, 22 Jul 2022 10:51:37 -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=gN5unbQl9tcLqWEBXkK86HqhAMP7N4+T1oXOAuNkkhc=; b=gzEfeDmT9SrO JK472p7opu+jsZ2wwmBlBFUXe9jQNKZhc9qnScZd/cHfQKAo4esR6M77z+plB4FPvo/U+8VHGjaDJ 1DuziO5aS9U8T7Y8G+i6m5U6/C5KweoOWsLT4iyPhBbJtbHNCEvdubhouDVrGn/sVsa+ZaT3oV//Q dh4xkGnW+Zf88/LPO02ywoxy3vObZUo5Pn1ohdmllOoQ/QufzGwApKZ4gSWFD5/cnmiXsmA48ZWWG vyj1oe3kbzwND+69CvLI1tyjT2baPMOxZUx7cRddVB0jglEo88mabEYTOz4ADaThQbtZMsLdXy/g2 +vW12kxZqs3oRHxnWZ5uTg==; Original-Received: from [87.69.77.57] (port=4176 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 1oEu09-00024G-Ep; Fri, 22 Jul 2022 10:51:37 -0400 In-Reply-To: <174616cd5c33bfc14b1f@heytings.org> (message from Gregory Heytings on Fri, 22 Jul 2022 10:16:52 +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:237633 Archived-At: > Date: Fri, 22 Jul 2022 10:16:52 +0000 > From: Gregory Heytings > cc: Eli Zaretskii > > > on my laptop, with Emacs from master from a week ago, take respectively > 150 seconds and 40 seconds. With the improvements on master, 1 is > instantaneous but 2 still takes about 5 seconds. Now, with the changes in > the feature/long-lines-and-font-locking branch, both are instantaneous. > The price of that speedup is that some portions of the buffer will be > mis-highlighted, which is unavoidable. The assertion below can now be violated: if (it->narrowed_begv) { record_unwind_protect (unwind_narrowed_begv, Fpoint_min ()); record_unwind_protect (unwind_narrowed_zv, Fpoint_max ()); SET_BUF_BEGV (current_buffer, it->narrowed_begv); SET_BUF_ZV (current_buffer, it->narrowed_zv); specbind (Qinhibit_widen, Qt); } val = Vfontification_functions; specbind (Qfontification_functions, Qnil); eassert (it->end_charpos == ZV); <<<<<<<<<<<<<<<<< because of the "narrowing". (I actually saw this assertion violation once on the branch, but I cannot reproduce it.)