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#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) Date: Mon, 15 Aug 2022 20:08:27 +0300 Message-ID: <83mtc5h1tg.fsf@gnu.org> References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <87tu6d4txk.fsf@localhost> <835yitiucj.fsf@gnu.org> <871qthsiio.fsf@localhost> <83tu6dh97n.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28476"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gregory@heytings.org, 57207@debbugs.gnu.org To: yantar92@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 15 19:09:24 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 1oNdad-0007Dh-9L for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Aug 2022 19:09:23 +0200 Original-Received: from localhost ([::1]:41192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oNdac-0005L1-1a for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Aug 2022 13:09:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42660) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNdaI-0005KL-Qy for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 13:09:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54218) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oNdaI-00053t-I8 for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 13:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oNdaI-0001Hk-8b for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 13:09: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, 15 Aug 2022 17:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57207 X-GNU-PR-Package: emacs Original-Received: via spool by 57207-submit@debbugs.gnu.org id=B57207.16605833314922 (code B ref 57207); Mon, 15 Aug 2022 17:09:02 +0000 Original-Received: (at 57207) by debbugs.gnu.org; 15 Aug 2022 17:08:51 +0000 Original-Received: from localhost ([127.0.0.1]:43967 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNda7-0001HI-2c for submit@debbugs.gnu.org; Mon, 15 Aug 2022 13:08:51 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:57958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNda3-0001H4-AM for 57207@debbugs.gnu.org; Mon, 15 Aug 2022 13:08:49 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59046) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNdZy-0004zM-33; Mon, 15 Aug 2022 13:08:42 -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=soxsbhKE+Zx/8D7qXqjNEEAX+TaILb43gInps+J7tmQ=; b=jl7lIHF29MFI flj8nz9bdz855pUOojbhkqw2+xOQJ6AvItyzYqycglzDDznwWrvKxne9+TX/bodAzWXDyhUFvKJxH ACLVFGoe9MVNz1pFxCVEAD5k5ww3ZHK64evnZgpO6KWdJr5HAij6UV+lCIyAsV0ODPDWrNQpBhuVm 5wi5Rskz9q+G7SsO3S8MYgA7B7bnwAvNkb1e0Erypm+Z5HnuEvohG/msWLQKvaZIXYDM30DGb8zgm PxlnbcZaH2DOYYJbQCyqFhpNyqpKMOu4bSfnub6MxXohzR0STRW2zSTYZ5U5SPtpv6fza3ZHJiPiK 7tlPORW9GJjzJaZXPKIM9w==; Original-Received: from [87.69.77.57] (port=3956 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 1oNdZx-00027V-IT; Mon, 15 Aug 2022 13:08:41 -0400 In-Reply-To: <83tu6dh97n.fsf@gnu.org> (message from Eli Zaretskii on Mon, 15 Aug 2022 17:28:44 +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:239820 Archived-At: > Cc: gregory@heytings.org, 57207@debbugs.gnu.org > Date: Mon, 15 Aug 2022 17:28:44 +0300 > From: Eli Zaretskii > > Can you tell some statistics about the lines in that file: > > . how many lines? > . how many lines longer than 10000 characters? > . how many lines longer than 100000 characters? > > And finally, can you post a short enough Org file, but long enough to > exhibit the features you need to do the "unfolding headlines hidden > using 'invisible text property" thing? And also tell which Org > commands you invoke to do that unfolding? Because I don't think I > understand what exactly are you doing in Org to trigger this, and thus > I cannot try reproducing it. Does the patch below fix the issue? diff --git a/src/xdisp.c b/src/xdisp.c index 0248e8e..03c43be 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -19589,7 +19589,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p) { ptrdiff_t cur, next, found, max = 0, threshold; threshold = XFIXNUM (Vlong_line_threshold); - for (cur = BEG; cur < Z; cur = next) + for (cur = BEGV; cur < ZV; cur = next) { next = find_newline1 (cur, CHAR_TO_BYTE (cur), 0, -1, 1, &found, NULL, true);