From unknown Sun Jun 22 17:13:45 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#57207 <57207@debbugs.gnu.org> To: bug#57207 <57207@debbugs.gnu.org> Subject: Status: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) Reply-To: bug#57207 <57207@debbugs.gnu.org> Date: Mon, 23 Jun 2025 00:13:45 +0000 retitle 57207 29.0.50; Fontification is slow after e7b5912b23 (Improvements= to long lines handling) reassign 57207 emacs submitter 57207 Ihor Radchenko severity 57207 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 14 11:54:53 2022 Received: (at submit) by debbugs.gnu.org; 14 Aug 2022 15:54:53 +0000 Received: from localhost ([127.0.0.1]:39560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNFwy-0000PR-UK for submit@debbugs.gnu.org; Sun, 14 Aug 2022 11:54:53 -0400 Received: from lists.gnu.org ([209.51.188.17]:57268) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNFwv-0000PG-7x for submit@debbugs.gnu.org; Sun, 14 Aug 2022 11:54:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56792) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNFwv-0001ao-1O for bug-gnu-emacs@gnu.org; Sun, 14 Aug 2022 11:54:49 -0400 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]:45631) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oNFwt-0007Hb-Cp for bug-gnu-emacs@gnu.org; Sun, 14 Aug 2022 11:54:48 -0400 Received: by mail-pl1-x631.google.com with SMTP id 13so4550880plo.12 for ; Sun, 14 Aug 2022 08:54:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:subject:to:from:from:to:cc; bh=1SdEtrZnUXId74Sy/ypseOHj8dAFgCmMmjzPNetOldE=; b=jIaJqUYSPm3wSZpF50hvjTpYBRhKIKx7f/3HydvbG4hZHryefJQTSGVE+v6EpO3wPA fnCR24HygX94KPnGBj+6TCTAIpgY1lA1XRMgF4n3wzAH9SB7B4MMMDamOhLK2aww2l8T /b6qqdZrgdYMgmDMBAaOTJUFLotlXDwhRmq7pjGj+i786VpmayAOYfJycono94p5lmha 2vbV6Vqa/XpIitQ/3e3BDdv8oqnC0ApwX9JbEq0O394HubCXs89RRTuNXEj5Or7xTV7D itDGZ/R8yDrL7PrGQ8T6sT+4GCR06SEPjH1RpddaE+r00uMwZnOmB4xj/sARx1YydAi9 8wsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc; bh=1SdEtrZnUXId74Sy/ypseOHj8dAFgCmMmjzPNetOldE=; b=vkK/3UBJFRqMByVHqzDa6fwHFqtsImVnj3cx3he63huzYBnBlxEqZqB/FVoCl6hK6x YmVpHjlkOhqrc8C3GW01GLphS0FzujI68HCjt4ANPrsCC8kuu4xDicU5BSTOIHmQus9w UkBHWa8bKrJevM/TuVAvKCCfpFk8UE/kCwt9TurxFwznDZn1xEm7WzSNoW0N5bI0/KSv wJNnLadq+LQZUR8Wknt0Ibo/lUBbiwUvjW1BYAO5l+3ZA8DByWkTVH5wUk0S+1v1Vl6X 4d+aZinB5kUh2RspS5sZZcjMvdqFMfQPOqcIAYsv0yivqD/c1VF3m+vAov0fzOgu2RlF T1/A== X-Gm-Message-State: ACgBeo12aF0l9C76b0Vg7r36YNS71U4zvYQAjzuohW8td/tNU4kF+Phq 1NJaVOIkZhGSgBrqtxayG1JOxBdL+6U= X-Google-Smtp-Source: AA6agR6Iuz3ZTCAJttBnwReMSD8ooW43WLT8HjE6dnRZnc8uGJ9NXNGfHL/wABP/RfWSsFuSyusTrA== X-Received: by 2002:a17:903:124b:b0:172:614b:2335 with SMTP id u11-20020a170903124b00b00172614b2335mr5147103plh.165.1660492485652; Sun, 14 Aug 2022 08:54:45 -0700 (PDT) Received: from localhost ([2409:8a70:2bf:80b0:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id h6-20020a17090a604600b001ec92575e83sm3247765pjm.4.2022.08.14.08.54.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Aug 2022 08:54:45 -0700 (PDT) From: Ihor Radchenko To: bug-gnu-emacs@gnu.org Subject: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) Date: Sun, 14 Aug 2022 23:55:46 +0800 Message-ID: <87bksmx1j1.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=yantar92@gmail.com; helo=mail-pl1-x631.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) I am experiencing severe performance degradation on current master. The degradation happens when working with Org files and I managed to bisect the cause down to e7b5912b235936b304701ba6b1e808d9b197fd4f is the first bad commit commit e7b5912b235936b304701ba6b1e808d9b197fd4f Author: Gregory Heytings Date: Sat Jul 16 19:06:38 2022 +0000 Improvements to long lines handling. * src/buffer.h (struct buffer): New field 'long_line_optimizations_p'. * src/buffer.c (syms_of_buffer): New variable 'long-line-threshold'. (reset_buffer): Initialize the 'long_line_optimizations_p' field. (Fbuffer_swap_text): Handle it. ... I tried M-x profiler to find the cause, but the 3-4 second hangs are not reflected in the profiler report. debug-on-entry + manual stepping through the function revealed that the hang happens when calling jit-lock-fontify-now. I was able to trigger the slowdown when unfolding headlines hidden using 'invisible text property. Do you have any idea what could be going wrong or how to debug things further? -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92 From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 14 12:08:32 2022 Received: (at 57207) by debbugs.gnu.org; 14 Aug 2022 16:08:32 +0000 Received: from localhost ([127.0.0.1]:39589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNGAC-0002uO-J5 for submit@debbugs.gnu.org; Sun, 14 Aug 2022 12:08:32 -0400 Received: from heytings.org ([95.142.160.155]:52812) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNGA9-0002uE-MX for 57207@debbugs.gnu.org; Sun, 14 Aug 2022 12:08:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1660493308; bh=sOfp7SE/pdsF6GG1JSA4DJyZTgu2PWznVDwoS4BoDwQ=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=YOAEY8FFNdm6IR1NyEQoj5QxBsTb7yysug500PlTU1oLBFb3iAOcD9MX+yqgmx5ra x+bL4f7VW+GiZF82Xns69oG+jfx6YEyzVscu9TUFMbYmfaPBgLjH6CfTPYdCw0ZDzO zyY7sDauiesW5b9+KdwEIetWRZFuvI/kEd8LsxHa0tdTiwYz8Q2t7vdEgWrFE3LVGd YHYwVizMJp8JIU/A+vRSQTmBYAQfvHnGzFNkHMDlJvyaBJJoxuBTCqdcPGWJaf5ik5 mTH4y8/AAkXGRi4XDS0SvZnycNPxGsCx/Evsb2Z10KUnOneusin3/ndi2qo4pgCCKf bYpUbXQIo3Yjg== Date: Sun, 14 Aug 2022 16:08:27 +0000 From: Gregory Heytings To: Ihor Radchenko Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <87bksmx1j1.fsf@localhost> Message-ID: <5900f208367791fbdfe2@heytings.org> References: <87bksmx1j1.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > > I am experiencing severe performance degradation on current master. > > The degradation happens when working with Org files > > [...] > > I was able to trigger the slowdown when unfolding headlines hidden using > 'invisible text property. > > Do you have any idea what could be going wrong or how to debug things > further? > Can you (a) provide a MRE so that we could track down what's going on and/or (b) try to set long-line-threshold to a larger value (20000, 50000, 100000) and see when the performance degradation disappears? From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 14 12:25:09 2022 Received: (at 57207) by debbugs.gnu.org; 14 Aug 2022 16:25:09 +0000 Received: from localhost ([127.0.0.1]:39628 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNGQH-0003LF-8A for submit@debbugs.gnu.org; Sun, 14 Aug 2022 12:25:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47280) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNGQA-0003KG-Cj for 57207@debbugs.gnu.org; Sun, 14 Aug 2022 12:25:02 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47426) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNGQ5-0002kf-5U; Sun, 14 Aug 2022 12:24:57 -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=06BveSXAdnAKznDuU7dOPYZhMtCiRw2yzJCxbH9z/pE=; b=fQBnxRTwhCGB t22r/jQs7vN3pxrHNcDPP64oU7rq7cZ3oFYoOJUf8DtQx8QffJJUC8/4tlxJIaTg6+VdkN81sNxc2 StxeFlcpJJZhFU8SWIME3oE8wCNKBXxjjwQa7SvsTCsejEQAuEYyyuYAEv6zmb8o1OgUk9AGFCTDK uaZWnK7vdxGqmyxA39AjGONadUIIgUoGi4gSGzQnvd4SYBd7sIutKIrG0NqeRRg7Wn4AVeKNPLzD8 nyM6riuyDqljTOInIyDgrgbknbVX2w0bW4p/RXxTqMFGo7TTZLWZaZJjfNu4QhTOMJ74MH3A2Pab3 L06YyvOHK2KwOWSc7q1JxA==; Received: from [87.69.77.57] (port=4243 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 1oNGQ4-0005ne-L4; Sun, 14 Aug 2022 12:24:56 -0400 Date: Sun, 14 Aug 2022 19:24:41 +0300 Message-Id: <83lerqkd2u.fsf@gnu.org> From: Eli Zaretskii To: Ihor Radchenko In-Reply-To: <87bksmx1j1.fsf@localhost> (message from Ihor Radchenko on Sun, 14 Aug 2022 23:55:46 +0800) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Ihor Radchenko > Date: Sun, 14 Aug 2022 23:55:46 +0800 > > I am experiencing severe performance degradation on current master. > > The degradation happens when working with Org files and I managed to > bisect the cause down to > > e7b5912b235936b304701ba6b1e808d9b197fd4f is the first bad commit > commit e7b5912b235936b304701ba6b1e808d9b197fd4f > Author: Gregory Heytings > Date: Sat Jul 16 19:06:38 2022 +0000 How large is that Org buffer? I mean, what is its size in characters? From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 14 13:31:28 2022 Received: (at 57207) by debbugs.gnu.org; 14 Aug 2022 17:31:28 +0000 Received: from localhost ([127.0.0.1]:39819 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNHSS-0007I1-9W for submit@debbugs.gnu.org; Sun, 14 Aug 2022 13:31:28 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56620) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNHSQ-0007Hl-Ag for 57207@debbugs.gnu.org; Sun, 14 Aug 2022 13:31:26 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48734) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNHSL-0004CC-1A; Sun, 14 Aug 2022 13:31:21 -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=G4JErx2jGaX5v0YlWKeQI/h8zuNG2KC5HHnk+VpZyUw=; b=QfZgnekuSWMU 0qHR6KgEKTHqx+/22zF001onrJ/e2I2ZpyjbW0kDg4nRPqQ9NwvvmduA+lU7Ss0dmbtP0X+ud98Yg qImxOdDGZmGDK+oWMSlPX4m8dFKEHz7j02Ql3KtpZhQa47dagMoKNTRSCZx3gjRQFE04y/T7oh9xq 2YDOsCpk8sGVTYUxiWAvVpaj0i4u1e2UeCCP+tI169dzhyNEfO9P6mo2oZ+zbu/4kcQMBbxkLuE4s 1NpoP7MtSowyT83OpV86HPokJUFRNYYaEFbqlLGSmp+17LyorkvfN6wyKy2dgJDoJiHOYYE9ibh7C sSAORvrXJ9VmNxnvbYZf+g==; Received: from [87.69.77.57] (port=4360 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 1oNHSJ-0003Xj-SV; Sun, 14 Aug 2022 13:31:20 -0400 Date: Sun, 14 Aug 2022 20:31:03 +0300 Message-Id: <83bksmka08.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings In-Reply-To: <5900f208367791fbdfe2@heytings.org> (message from Gregory Heytings on Sun, 14 Aug 2022 16:08:27 +0000) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 57207@debbugs.gnu.org > Date: Sun, 14 Aug 2022 16:08:27 +0000 > From: Gregory Heytings > > > I am experiencing severe performance degradation on current master. > > > > The degradation happens when working with Org files > > > > [...] > > > > I was able to trigger the slowdown when unfolding headlines hidden using > > 'invisible text property. > > > > Do you have any idea what could be going wrong or how to debug things > > further? > > Can you (a) provide a MRE so that we could track down what's going on > and/or (b) try to set long-line-threshold to a larger value (20000, 50000, > 100000) and see when the performance degradation disappears? Gregory, I suspect that the problem could be in the loop in redisplay_window, where we look for long lines. Changing visibility in Org changes text properties, and that causes MODIFF to be incremented. I actually can cause something similar without Org at all, just by scrolling fast through xdisp.c. You can put a breakpoint inside the 'if' that guards the re-evaluation of the long-lines in redisplay_window, and scroll with C-v through xdisp.c immediately after visiting it -- I hit the breakpoint from time to time, although there are no changes to the buffer except faces placed by fontifications. jit-lock runs under with-silent-modifications, but that only adjusts SAVE_MODIFF to create an illusion of unchanged buffer, it doesn't affect UNCHANGED_MODIFIED. Maybe we should measure the increment in MODIFF across the calls to fontification-functions in handle_fontified_prop, and correct UNCHANGED_MODIFIED by the same increment when fontification-functions return? Ihor, if you set long-line-threshold to a nil value, do the problems go away? If they do, can you put a breakpoint in xdisp.c here: /* Check whether the buffer to be displayed contains long lines. */ if (!NILP (Vlong_line_threshold) && !current_buffer->long_line_optimizations_p && MODIFF - UNCHANGED_MODIFIED > 8) { ptrdiff_t cur, next, found, max = 0, threshold; threshold = XFIXNUM (Vlong_line_threshold); <<<<<<<<<<<<<<<<<<<<<<<<<<< for (cur = BEG; cur < Z; cur = next) { next = find_newline1 (cur, CHAR_TO_BYTE (cur), 0, -1, 1, &found, NULL, true); if (next - cur > max) max = next - cur; if (!found || max > threshold) break; } if (max > threshold) current_buffer->long_line_optimizations_p = true; } and see how frequently this gets called in the same buffer when you do whatever shows the performance degradation? From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 14 22:35:59 2022 Received: (at 57207) by debbugs.gnu.org; 15 Aug 2022 02:35:59 +0000 Received: from localhost ([127.0.0.1]:40171 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNPxO-0004Do-VL for submit@debbugs.gnu.org; Sun, 14 Aug 2022 22:35:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60982) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNPxN-0004Da-A3 for 57207@debbugs.gnu.org; Sun, 14 Aug 2022 22:35:57 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58018) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNPxH-000182-Ul; Sun, 14 Aug 2022 22:35:51 -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=eSAgyutMECXIf7O3vlgAXAovhr5mJ/dxaUFYQSHhHOM=; b=NWRfASwltgEa smJsfr1VLJSqo+VXyXHbD7VXzxbYCl2UDevFqbI7l7Nm16FzVYC8t1SSmBexsOISAjatiXUxh6G5f c4UzXwsThR8IUhCA52zi+Q/gQ0Dg+kyCcXV3RzP6MXCeeyw06TtjnPDpd6mKP6G+OW3h7KPTOymHU uOIlRPearDhEOZ9J8TEvP3Q3pmayPm5jTB3Pv5q32Y9Vca3YzBHShtCwekjo/LmXfOvsgnQRVrRar KW/jmwCgr307N4+48cjqBifDCELEj4yEglpjGnYegZWeeNZ6PwzaEz+hQq5r+gXdoZv9MDm22KagY vAYYvllxKX1lq8s/4Vr2rw==; Received: from [87.69.77.57] (port=2160 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 1oNPxH-0006j4-Eh; Sun, 14 Aug 2022 22:35:51 -0400 Date: Mon, 15 Aug 2022 05:35:37 +0300 Message-Id: <83sflyi686.fsf@gnu.org> From: Eli Zaretskii To: gregory@heytings.org In-Reply-To: <83bksmka08.fsf@gnu.org> (message from Eli Zaretskii on Sun, 14 Aug 2022 20:31:03 +0300) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <83bksmka08.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 57207@debbugs.gnu.org, yantar92@gmail.com > Date: Sun, 14 Aug 2022 20:31:03 +0300 > From: Eli Zaretskii > > Maybe we should measure the increment in MODIFF across the calls to > fontification-functions in handle_fontified_prop, and correct > UNCHANGED_MODIFIED by the same increment when fontification-functions > return? Hmm... I'm having second thoughts on this idea. Let me think some more. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 15 05:03:12 2022 Received: (at 57207) by debbugs.gnu.org; 15 Aug 2022 09:03:12 +0000 Received: from localhost ([127.0.0.1]:40850 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNW08-0006e1-4C for submit@debbugs.gnu.org; Mon, 15 Aug 2022 05:03:12 -0400 Received: from heytings.org ([95.142.160.155]:53908) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNW06-0006dt-LO for 57207@debbugs.gnu.org; Mon, 15 Aug 2022 05:03:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1660554190; bh=VOHZcTJXFdTxeAfGE0H428UElLWyz9ZU8n0JGcz34ho=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=jNY7lMG/3agB7TzqxQSGJUIPcMJpNN/rNJoEbR8gGxzNdX9q0S1nMypDuFvbPZ6IL 20qmo5uLNemq5QWpo60V3iyklqaMJw/YfhOoKwiJR1MZL/CEbLtedwm7WLgMajQeEC uBYzH5/5EcZPeIW6CwNdMF7y2iSQ07J3BDE78+p6WVE///jdBnp/Td5Bz3KiI6xqMm wvKWIHzS+JG2xrGW3/btbmJ8x6L3L4Y3QPPrOZsGP4/4/8BCCVW+2F0pCEvk+IjFg8 o/eSqSO6k6qUNeYt2cKrvVw1YYpfeRxYfzMquGVWu7dRUr0CAm+GkFXreucHgd6Xks +igRfHaGsT0Dw== Date: Mon, 15 Aug 2022 09:03:09 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <83sflyi686.fsf@gnu.org> Message-ID: <3a1232a17b32ec05f762@heytings.org> References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <83bksmka08.fsf@gnu.org> <83sflyi686.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> Maybe we should measure the increment in MODIFF across the calls to >> fontification-functions in handle_fontified_prop, and correct >> UNCHANGED_MODIFIED by the same increment when fontification-functions >> return? > > Hmm... I'm having second thoughts on this idea. Let me think some more. > I think it would be better to wait for Ihor's feedback before trying to fix his problem. Ihor? From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 15 07:38:46 2022 Received: (at 57207) by debbugs.gnu.org; 15 Aug 2022 11:38:46 +0000 Received: from localhost ([127.0.0.1]:41042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNYQg-0006fH-0x for submit@debbugs.gnu.org; Mon, 15 Aug 2022 07:38:46 -0400 Received: from mail-pl1-f182.google.com ([209.85.214.182]:37834) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNYQc-0006ez-Jo for 57207@debbugs.gnu.org; Mon, 15 Aug 2022 07:38:44 -0400 Received: by mail-pl1-f182.google.com with SMTP id m2so6118390pls.4 for <57207@debbugs.gnu.org>; Mon, 15 Aug 2022 04:38:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc; bh=+kwsrTkfOH3rmAslVKYUjR1NHNxuaL+GX7hKk4aZNus=; b=NFySaNhCI9giLcg2MoVC13WdusyhVbupGwDcBIU+XYtXM412Xp9MSlibeSQe/WfFJX qOq4y1D2pc5KcT1BhH2h0aVFGSv0iVLJUCpPSMjlDgCcpl6D2F3807b5cxSErJl9qBFh Wc+AsegV59xnWEsXt4OwATDoQh6UXoMoMp4ricE9SNvZTuoBhDUs9pafckD8A56CIt15 kOA3dD7Tx3tmCHh0qitZR2/CarxBhR0ObgNFYqvbNOz09M8B4tEUpZozjAjuZmqt3Ft2 sZ4BEL9kcniDImbESE7h7aqhWfKYcq8mBuJ1gpGGab+Jt0VW5RPOQQDAzSf1j7Kxb4A8 GGRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc; bh=+kwsrTkfOH3rmAslVKYUjR1NHNxuaL+GX7hKk4aZNus=; b=YBf6r0Xx+Iq5CgyviJMuC6eg5mIFMCK5GmWPD6CXw7z2ASEodjj4sRV2NNeo9NHM+j kmn+lY+/TdFQfKb6lq3NGHU8IrxNiVyrLJdXWj/EJAQxYOdK8tLHKWPNZhzzaACxUVKG CLOZxeL5Rfs+FyaC2KGKwwG4Mb0Z1eBRiObNmH8N1nAciehXX4IcFbjfqAVHIoR82z3k YD+hs2nJruR8o8peBEyCYPUAFOEanrkoJtrmvMBwZRfMRYc308K1nN6SrtO2ugqjpRAb VxCSJpbfwduUzbtPeZDA8BQY90Eq9VvmDsDCS0VrF0mAEmWuGS0K6oVaop3JxF4nO/eq pm2g== X-Gm-Message-State: ACgBeo04BByCpk3Lqm1JBnGEP62R+HpdcsoSlAfsy3ZVO649Eta4n8TA QqklYunaRggzAumuc04SQuE= X-Google-Smtp-Source: AA6agR5RG+mB6iTchbEhe625yxC99AvdCiT4oS+IxICdnCPF0KYJJr7cZqxU2LWtlPO0Ma9FJdZD2w== X-Received: by 2002:a17:903:25d2:b0:16e:e1c9:e0eb with SMTP id jc18-20020a17090325d200b0016ee1c9e0ebmr16186311plb.92.1660563516351; Mon, 15 Aug 2022 04:38:36 -0700 (PDT) Received: from localhost ([2409:8a70:2bf:80b0:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id i15-20020a170902c94f00b0016ed8af2ec0sm6877668pla.29.2022.08.15.04.38.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Aug 2022 04:38:34 -0700 (PDT) From: Ihor Radchenko To: Gregory Heytings Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <5900f208367791fbdfe2@heytings.org> References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> Date: Mon, 15 Aug 2022 19:39:35 +0800 Message-ID: <87tu6d4txk.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Gregory Heytings writes: >> Do you have any idea what could be going wrong or how to debug things >> further? >> > > Can you (a) provide a MRE so that we could track down what's going on > and/or (b) try to set long-line-threshold to a larger value (20000, 50000, > 100000) and see when the performance degradation disappears? (a) It is hard. The problem appears when using a combination of a 20Mb Org file and WIP Org mode branch. (b) Setting long-line-threshold to nil makes the slowdown disappear. Increasing long-line-threshold to 100000 made Emacs hang. I had to kill it using kill -9. -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92 From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 15 07:40:34 2022 Received: (at 57207) by debbugs.gnu.org; 15 Aug 2022 11:40:35 +0000 Received: from localhost ([127.0.0.1]:41046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNYSQ-0006iD-KR for submit@debbugs.gnu.org; Mon, 15 Aug 2022 07:40:34 -0400 Received: from mail-pf1-f171.google.com ([209.85.210.171]:36530) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNYSL-0006hx-R3 for 57207@debbugs.gnu.org; Mon, 15 Aug 2022 07:40:33 -0400 Received: by mail-pf1-f171.google.com with SMTP id a22so5847080pfg.3 for <57207@debbugs.gnu.org>; Mon, 15 Aug 2022 04:40:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc; bh=9+O3gB22k5x/P526dLoUqaZ0IqNbMM+Ba7vOjfpZyHE=; b=GEpbaj+ITK3Ux7Dk+OwjlaMXmG0VI+s1ydrP0d00wFV5J8+v0L+ZBWieOaz03ojwbx JuNRKyYERcw8TJW/g30buya8Y9QDWFyElcfovGid++HZ7CmlEqdust0Yl8prJna074ww mMzgDRyHicvJggOJSraH2WH36kIVFtJY6MYMeWiDfFmV2wII/IrpB9HHTDLytqQGPmCS w5rIJWHiA1KE2FESU6a2f4nzl1GGYJkWF3LiVqZS0+CW6BlYhYukQ9H6q/mliD8iUL7i lR4uWHPkO9XUCnlP+sMM4gJwwiMpB9L4vfYJuWGzepMqA9SxeroOODHbh4Z6dJSQUyh2 BNXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc; bh=9+O3gB22k5x/P526dLoUqaZ0IqNbMM+Ba7vOjfpZyHE=; b=lpWzGLOHNJuYgE1UnhdmECT/LzfU8+a19Cjabpho2aia2r1O4f4WM7J1RWOCz+ysLU kmnasTv8/xa+Eg96pJfFoqCTXUi+qdIyAz8SfyPhY9TQYwsm9+vdYmEloN9jIJOMlPme Tx3uwox4gfgcAD4RnXDCWPsC/QOsL1LtLk+6A/a2KBGF+EcCeJtu8Eq9wXEHTLIeZKVw udmCLIASgKiQH2PSRdvgZYQr6JdwQq6zrX1bQap30+SS8Tsrip6fJZ2hBPukadS9x84P bRM9BLbVbpfJhzUsaaUzI685Imaa20cfynASahzWlsLLopwFxetg8Tb7+RvtrkXLy+3X e0dg== X-Gm-Message-State: ACgBeo0AQmS+ZevrLqC1LYDfs1fA5WpOfxa1WKzoHE276BLCxLv92gmQ le4CHDEa1PyhwFQVlpKu9dM= X-Google-Smtp-Source: AA6agR4j8X7zgca5SXWX/8io+qBT93duzUOpG/8Sp8XBQFw+9sMs3bLLKexnym15iEc21YY+fJQP2w== X-Received: by 2002:a65:68d0:0:b0:422:ebd2:302 with SMTP id k16-20020a6568d0000000b00422ebd20302mr10272376pgt.340.1660563624016; Mon, 15 Aug 2022 04:40:24 -0700 (PDT) Received: from localhost ([2409:8a70:2bf:80b0:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id w11-20020a170902ca0b00b001715954af99sm6580413pld.212.2022.08.15.04.40.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Aug 2022 04:40:23 -0700 (PDT) From: Ihor Radchenko To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <83bksmka08.fsf@gnu.org> References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <83bksmka08.fsf@gnu.org> Date: Mon, 15 Aug 2022 19:41:23 +0800 Message-ID: <87r11h4tuk.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 57207 Cc: Gregory Heytings , 57207@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Eli Zaretskii writes: > Ihor, if you set long-line-threshold to a nil value, do the problems > go away? Yes. > If they do, can you put a breakpoint in xdisp.c here: > ... > > and see how frequently this gets called in the same buffer when you do > whatever shows the performance degradation? Could you please clarify what exactly do I need to look for? What do you mean by frequency? Should I share some kind of gdb log? -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92 From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 15 07:41:33 2022 Received: (at 57207) by debbugs.gnu.org; 15 Aug 2022 11:41:33 +0000 Received: from localhost ([127.0.0.1]:41051 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNYTN-0006kB-1O for submit@debbugs.gnu.org; Mon, 15 Aug 2022 07:41:33 -0400 Received: from mail-pg1-f181.google.com ([209.85.215.181]:38529) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNYTK-0006jx-E8 for 57207@debbugs.gnu.org; Mon, 15 Aug 2022 07:41:31 -0400 Received: by mail-pg1-f181.google.com with SMTP id r22so6292456pgm.5 for <57207@debbugs.gnu.org>; Mon, 15 Aug 2022 04:41:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc; bh=vy9BUP8qYkPIqs+xIdSfxhyZ1saDS0450KZGmn6CFRA=; b=CtJy/VLpJTu+Vh8GX3huFOmZZWluDxpjJo1SwBEuYj0jewzLGlQ43fHZztuTF4jEcU ey3VMWdTpYwVBpOIrooSPY02SytjLCXvmrF/jP1eFLbcaswUYAG6mtjoenz7znrsnFQc DCjrZmYkSfewWU69fmDoQdDPcJZMZGhrGMHHOsJqV1bfcnD4iATJFAjPMbicboe0/tM1 axpaQPh/DyEJihy1N/C8WkL2OUmC/dHPGCRT/FeH2FfiQQnA29xjqK+R+cyEGzzVbnkr HcZVSZSfA1HPn7Jyu8Y04PnAzmCTbJcMtvar3xMbsx0jgbbieuJeMkxWlIEc5gHzGVs4 VdHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc; bh=vy9BUP8qYkPIqs+xIdSfxhyZ1saDS0450KZGmn6CFRA=; b=E3pFCeXx524Fv0vpKZ6Dh+/7c1jgQYzn+N4j1njfrg6uHXNqtK8DxFAAoB5RH+sz+q cbYq5uCXgXmWrpXEju2EZCiRkeVjgFEhDiIj5e2ZbysBfTGf4FF+Y3zrpngK7mdUm938 yFvsNtlVlvcyz1q4QRWW5ta8X6UsNR0DCDiSc/rA40lAVwqt8OPFvBwe51O9qeZNI8jQ IFznkeyq012M4uAPYMbSEbWzpoThqWqSdQmmm7Yk/fm+q3nP2brUAF5eSbsS2qhOU+tD 7B07H6Ew3EAND3KFZeRLkgHsdV1XTxuXU1qKGnh4YtqtWWpahkbL1QXiCC7a+pZNpGv3 yClQ== X-Gm-Message-State: ACgBeo0ZW5ndk1G62uBkqN4ZHGjOjDNfuOLclcnwMBLfHDSaPhmLfU1w znPPXJ+8Q9E21dE5RcIE8gg= X-Google-Smtp-Source: AA6agR6QuHLIrLtIpbtEnwZifJAtsMPgNZt3LMMB/8U/BNbmQU/+h/9RryvjksH8zuiW9bkUuSoUTw== X-Received: by 2002:a65:6d98:0:b0:41d:d9:a338 with SMTP id bc24-20020a656d98000000b0041d00d9a338mr13278293pgb.421.1660563684922; Mon, 15 Aug 2022 04:41:24 -0700 (PDT) Received: from localhost ([2409:8a70:2bf:80b0:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id v7-20020a632f07000000b0041cd5ddde6fsm5687101pgv.76.2022.08.15.04.41.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Aug 2022 04:41:24 -0700 (PDT) From: Ihor Radchenko To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <83lerqkd2u.fsf@gnu.org> References: <87bksmx1j1.fsf@localhost> <83lerqkd2u.fsf@gnu.org> Date: Mon, 15 Aug 2022 19:42:24 +0800 Message-ID: <87o7wl4tsv.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Eli Zaretskii writes: > How large is that Org buffer? I mean, what is its size in > characters? (buffer-size) ; => 19,968,434 -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92 From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 15 07:53:39 2022 Received: (at 57207) by debbugs.gnu.org; 15 Aug 2022 11:53:39 +0000 Received: from localhost ([127.0.0.1]:41078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNYf5-00076A-7L for submit@debbugs.gnu.org; Mon, 15 Aug 2022 07:53:39 -0400 Received: from quimby.gnus.org ([95.216.78.240]:58470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNYez-00075t-GG for 57207@debbugs.gnu.org; Mon, 15 Aug 2022 07:53:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=XS4OE6GtLxrYhbINfJb4epiOe7OYVD0Io6HRG3sJlrc=; b=UUX7R96QAfAGB5RlDV3JtiJA89 /ipkn+7vPTcRpn+ZkoJq9NrG4CABBHj/zoVJH2DwX2Jog2xVNEc8h9fk4AF1ZJtkQz0oJHPXMOv/c 5qlop0QIYF9c5/xZOjbIDDsOIw8bF29Dq94whoEXn2hwSLc/S4IeSXIw4dwh1SxyErMs=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oNYeq-00074s-HJ; Mon, 15 Aug 2022 13:53:26 +0200 From: Lars Ingebrigtsen To: Ihor Radchenko Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <87o7wl4tsv.fsf@localhost> (Ihor Radchenko's message of "Mon, 15 Aug 2022 19:42:24 +0800") References: <87bksmx1j1.fsf@localhost> <83lerqkd2u.fsf@gnu.org> <87o7wl4tsv.fsf@localhost> X-Now-Playing: Black Dice's _Mod Prog Sic_: "Swinging" Date: Mon, 15 Aug 2022 13:53:23 +0200 Message-ID: <87r11h90zw.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: I don't have anything substantive here, but I've also seen some oddities that may be related to something in this area, but I have no case for reproduction. 1) In an HTML buffer with huge JPEGs hidden under display properties (we're talking multi-megabyte lines -- but hidden), I've seen some odd point movements around these ima [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: Eli Zaretskii , 57207@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) I don't have anything substantive here, but I've also seen some oddities that may be related to something in this area, but I have no case for reproduction. 1) In an HTML buffer with huge JPEGs hidden under display properties (we're talking multi-megabyte lines -- but hidden), I've seen some odd point movements around these images -- like the cursor gets stuck at the edges of that line. But only sometimes. 2) My *Messages* buffer frequently ends up being narrowed, and that didn't happen before. Is that something that can happen somehow? Or is that totally unrelated? (My *Messages* buffer is 20K lines long and sometimes has lines that are tens of K long.) Like I said, I can't reproduce either thing, which is why I haven't reported it, but I thought I'd mention it in case it's somehow related to this feature. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 15 08:07:15 2022 Received: (at 57207) by debbugs.gnu.org; 15 Aug 2022 12:07:15 +0000 Received: from localhost ([127.0.0.1]:41114 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNYsF-0007Sy-1H for submit@debbugs.gnu.org; Mon, 15 Aug 2022 08:07:15 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNYsD-0007Si-Ef for 57207@debbugs.gnu.org; Mon, 15 Aug 2022 08:07:13 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37298) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNYs7-0005XC-5e; Mon, 15 Aug 2022 08:07:07 -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=VIMXmjjOi4BEAKjTbJn6lrlFvpZk8nObkJewczbvBcY=; b=Xi3MAM3m6LNL eozBkfIk6wQOP79dlSDndklKXgMOX4GBbSKY39kzHraWw71gMYaE30kKPjt7gaX9C8GUuoQ4VldKH 6CYmRDBJYbN8/tTM//TE0k2IXT2YEiwYhzpUW5MwI8Nm5bdhLXlIUhLvs8ap+TMtzpEQBMXMBGskO AsloZ97Np7yOPHSrnbDeD/wfW8ExbM5sG6reLxNMP6+FcFVX2XzVunUi316fD7Ct3c0OSZgymB4T1 Jd3xqTMiG4rsdtXqhtdLHGzPdCBcveXSFINZmqtj3cU8OguIwwE2taOM9dewYeTceI1cQh6B0HSnp RJPqJYaYSYV8oqCeWzkx6Q==; Received: from [87.69.77.57] (port=1256 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 1oNYs6-0003Va-L3; Mon, 15 Aug 2022 08:07:06 -0400 Date: Mon, 15 Aug 2022 15:06:52 +0300 Message-Id: <835yitiucj.fsf@gnu.org> From: Eli Zaretskii To: Ihor Radchenko In-Reply-To: <87tu6d4txk.fsf@localhost> (message from Ihor Radchenko on Mon, 15 Aug 2022 19:39:35 +0800) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <87tu6d4txk.fsf@localhost> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: gregory@heytings.org, 57207@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 57207@debbugs.gnu.org > From: Ihor Radchenko > Date: Mon, 15 Aug 2022 19:39:35 +0800 > > (b) Setting long-line-threshold to nil makes the slowdown disappear. > Increasing long-line-threshold to 100000 made Emacs hang. I had to kill > it using kill -9. When it hangs, can you attach a debugger to it and try to figure out where it loops? The instructions to do so are in etc/DEBUG, under "If the symptom of the bug is that Emacs fails to respond". If that procedure is more than you can afford, at least post the results of "thread apply all bt" after attaching the debugger to a "hung" Emacs. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 15 08:08:53 2022 Received: (at 57207) by debbugs.gnu.org; 15 Aug 2022 12:08:53 +0000 Received: from localhost ([127.0.0.1]:41123 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNYto-0007VW-Mx for submit@debbugs.gnu.org; Mon, 15 Aug 2022 08:08:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52230) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNYtn-0007VJ-Sw for 57207@debbugs.gnu.org; Mon, 15 Aug 2022 08:08:52 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37326) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNYti-0005kV-M8; Mon, 15 Aug 2022 08:08:46 -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=a1hwPcH0+e1AZdRvEz7ZYz/h54v4AsqjcJCZAzFZ4mg=; b=eWBGFpZPb/iE DItqAcD3Xc9RgyhBR5QFufHIwR0xkypIg0sFXsMciPYHttoQxgZVrKh4wb5jzwuiLbT9pME6HcXpL bTDIf68ui0VOpu+47bjSUergYOswU5YgKx/Xf6/VRFZ2R/YdLQx9OcwYIarXumGDZKA5a+KS443/A jbw2NmDmGC59G1TLPFuK15oy1oc00yALoBpxrSLUwGS7Ct56kdF6MooLyihwSuBM6JilMyB6L4/P2 FsN65krr4sEynBGy8H1EEgiP5ufIe8oGBRngxQ5Kk2DVharhy6iGkquEZ6uKT3sqzQ3N0wzjbko99 9UPHWQIWFr2mMFpS0OHZ1Q==; Received: from [87.69.77.57] (port=1356 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 1oNYth-0003hC-6o; Mon, 15 Aug 2022 08:08:46 -0400 Date: Mon, 15 Aug 2022 15:08:31 +0300 Message-Id: <834jydiu9s.fsf@gnu.org> From: Eli Zaretskii To: Ihor Radchenko In-Reply-To: <87r11h4tuk.fsf@localhost> (message from Ihor Radchenko on Mon, 15 Aug 2022 19:41:23 +0800) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <83bksmka08.fsf@gnu.org> <87r11h4tuk.fsf@localhost> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: gregory@heytings.org, 57207@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Ihor Radchenko > Cc: Gregory Heytings , 57207@debbugs.gnu.org > Date: Mon, 15 Aug 2022 19:41:23 +0800 > > Eli Zaretskii writes: > > > If they do, can you put a breakpoint in xdisp.c here: > > ... > > > > and see how frequently this gets called in the same buffer when you do > > whatever shows the performance degradation? > > Could you please clarify what exactly do I need to look for? What do you > mean by frequency? Should I share some kind of gdb log? I will, if your information from the "hung" Emacs will not give us a good clue. Given what you say there, it sounds like my theory behind the above doesn't hold water, because it cannot explain the effect of enlarging long-line-threshold that you experience. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 15 08:10:47 2022 Received: (at 57207) by debbugs.gnu.org; 15 Aug 2022 12:10:47 +0000 Received: from localhost ([127.0.0.1]:41128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNYvf-0007Ys-75 for submit@debbugs.gnu.org; Mon, 15 Aug 2022 08:10:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52568) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNYvd-0007Yh-Og for 57207@debbugs.gnu.org; Mon, 15 Aug 2022 08:10:46 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37346) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNYvY-00065l-49; Mon, 15 Aug 2022 08:10:40 -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=g8wjaGxOVhZ1ska+DYJiio7GlM1Xt9Qn9AfQo1f7hCM=; b=YRj4VTJsRt/5 qSlkXlaU6WyGDKa2lWYf9XrmiRct5Vu9Tk3lwVtnAvEx7HrNEFD+7LLkG1eLWcguvpqYYw299pa2E pKJ2rxiE71bRqtHjyJ6d4jMyv7M2N3IHuY02itJpi5zzfbQvyXugKcp20ZVC9dgKQI/BOyNGhP/gR IZmo82McFExToluAib+HmYuaqKjUzVMLRHk3ltETleDU4/w/DkXdUE90ZAprU/X/kOKdNIOQ4C1w/ CDGKWztcFe6wt3/jQbRDq3ZkBETaHjpF4qIpqrJPHOJJb9AJr+CxHzC0dxdK0b6To8sM4lu2DNM25 TXq7TfLYcHNcggmno8qJ5Q==; Received: from [87.69.77.57] (port=1471 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 1oNYvX-0003sj-7C; Mon, 15 Aug 2022 08:10:39 -0400 Date: Mon, 15 Aug 2022 15:10:25 +0300 Message-Id: <8335dxiu6m.fsf@gnu.org> From: Eli Zaretskii To: Lars Ingebrigtsen In-Reply-To: <87r11h90zw.fsf@gnus.org> (message from Lars Ingebrigtsen on Mon, 15 Aug 2022 13:53:23 +0200) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <83lerqkd2u.fsf@gnu.org> <87o7wl4tsv.fsf@localhost> <87r11h90zw.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: Eli Zaretskii , 57207@debbugs.gnu.org > Date: Mon, 15 Aug 2022 13:53:23 +0200 > > I don't have anything substantive here, but I've also seen some oddities > that may be related to something in this area, but I have no case for > reproduction. > > 1) In an HTML buffer with huge JPEGs hidden > under display properties (we're talking multi-megabyte lines -- but > hidden), I've seen some odd point movements around these images -- like > the cursor gets stuck at the edges of that line. But only sometimes. Can you show an example of such a file, or tell where can one download it? > 2) My *Messages* buffer frequently ends up being narrowed, and that > didn't happen before. Is that something that can happen somehow? If it does, it could be that we don't undo the narrowing in some situations? From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 15 10:11:28 2022 Received: (at 57207) by debbugs.gnu.org; 15 Aug 2022 14:11:28 +0000 Received: from localhost ([127.0.0.1]:43745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNaoS-0002tB-0h for submit@debbugs.gnu.org; Mon, 15 Aug 2022 10:11:28 -0400 Received: from mail-pg1-f182.google.com ([209.85.215.182]:40633) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNaoO-0002su-HQ for 57207@debbugs.gnu.org; Mon, 15 Aug 2022 10:11:26 -0400 Received: by mail-pg1-f182.google.com with SMTP id 24so6595388pgr.7 for <57207@debbugs.gnu.org>; Mon, 15 Aug 2022 07:11:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc; bh=oIhGpHP+8BIaEZ6xBX4e8A2cnKxAZ8AlOE4ohcoqvas=; b=N49FQZWdxI2WF5995XzpoGmZzi1QeLioASqNoRK4VlfJSKxMAF6RHspNCt4v0IKLv9 WApVuJlXdiGKdymM+7AjpUK92yXf5viWhWSQsTY1GnQS8tnHZTuT5hSwyn+fGPQSZix0 jacYJqIz+rVSjgNXD0/1DufiEelwJc0OwDN1Qx/dT/hpoDDGYbUkWTEtUfjTqDO55GuS LYqJBiUzDayraBsEQ2AZzMGn12VMBgvwrgMG+qHwvUKP5E3Hwk6SdFHUdH201fNyk6rM oSz34PRhcqRf+Nv3QRAVrQKfhC279DZ5u/VNX/Pqp5+G9RaSnqaUdhUn3UmJCPOcJgNy WcDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc; bh=oIhGpHP+8BIaEZ6xBX4e8A2cnKxAZ8AlOE4ohcoqvas=; b=b3pn6a4H4RkMmtw/kGehZZ/WOTcfmrLf806O+dYObz/SRDoDLSMfYpNBY9lC9sstUM eQi/L1Yh+pHdbrop41YfVb52z18PzcbGe4wmHx3li/5yGbrh9aS5iWfl2ZViIPpOl8zf 2wKOnTEE0JBMa3Qpi6dNCvIGCGKvsj522vKyBXg0opJLLw1OlKETg3lXFKgRK/76V6OW MNqvYbpCUoU4v+eyKvIyCFORzSlWWaZpTXghNT/ZUslVKXiqTPTMwdGmFUPLWAvp0HMn iMBR6to3aqeWJB+xX/ZVUi3mYxFdCM0aRYpIiq2M3as+qsDbAudcSe9kpG87CmhlMNH9 mb2A== X-Gm-Message-State: ACgBeo0wAsXhjPeyJgfDS56e+K7X8lFHiDVOOhJy+ooX4ywuTvKqJrUH UcYn3lvBOJrYQO4TrN9eTl8= X-Google-Smtp-Source: AA6agR6iYRu1fOFzSgJOFgrjwVzYJIiE9MBRjJK0FjmLfT/SkhbkewaWh8rU5JX3v8jY+IIQtHlN2g== X-Received: by 2002:a65:4501:0:b0:3fc:4895:283b with SMTP id n1-20020a654501000000b003fc4895283bmr14367022pgq.231.1660572678557; Mon, 15 Aug 2022 07:11:18 -0700 (PDT) Received: from localhost ([111.18.131.92]) by smtp.gmail.com with ESMTPSA id k133-20020a62848b000000b0052d24402e52sm1497022pfd.79.2022.08.15.07.11.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Aug 2022 07:11:17 -0700 (PDT) From: Ihor Radchenko To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <835yitiucj.fsf@gnu.org> References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <87tu6d4txk.fsf@localhost> <835yitiucj.fsf@gnu.org> Date: Mon, 15 Aug 2022 22:12:15 +0800 Message-ID: <871qthsiio.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 57207 Cc: gregory@heytings.org, 57207@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Eli Zaretskii writes: >> (b) Setting long-line-threshold to nil makes the slowdown disappear. >> Increasing long-line-threshold to 100000 made Emacs hang. I had to kill >> it using kill -9. > > When it hangs, can you attach a debugger to it and try to figure out > where it loops? The instructions to do so are in etc/DEBUG, under "If > the symptom of the bug is that Emacs fails to respond". If that > procedure is more than you can afford, at least post the results of > "thread apply all bt" after attaching the debugger to a "hung" Emacs. Emacs with debugging support is generally slow on my large Org file, but I think that I managed to get some kind of backtrace with the default value of long-line-threshold. I typed C-z in GDB shell right after triggering the slow operation (it is headline unfolding in my testing). (I did confirm that setting long-line-threshold to nil makes the unfolding instant) The GDB log is below. Hope it gives some clues. ^Z Thread 1 "emacs" received signal SIGTSTP, Stopped (user). 0x00005555557e4840 in buf_bytepos_to_charpos (b=0x5555602f5ff0, bytepos=11098754) at marker.c:353 353 CONSIDER (tail->bytepos, tail->charpos); (gdb) step 358 if (best_above - bytepos < distance (gdb) finish Run till exit from #0 buf_bytepos_to_charpos (b=0x5555602f5ff0, bytepos=11098754) at marker.c:358 BYTE_TO_CHAR (bytepos=11098754) at /home/yantar92/Git/emacs/src/buffer.h:1053 1053 } Value returned is $1 = 10568710 (gdb) finish Run till exit from #0 BYTE_TO_CHAR (bytepos=11098754) at /home/yantar92/Git/emacs/src/buffer.h:1053 0x000055555581da55 in find_newline1 (start=10568693, start_byte=11098737, end=19968614, end_byte=20651065, count=0, counted=0x7fffffff9480, bytepos=0x0, allow_quit=true) at search.c:3260 3260 return BYTE_TO_CHAR (lim_byte + next); Value returned is $2 = 10568710 (gdb) finish Run till exit from #0 0x000055555581da55 in find_newline1 (start=10568693, start_byte=11098737, end=19968614, end_byte=20651065, count=0, counted=0x7fffffff9480, bytepos=0x0, allow_quit=true) at search.c:3260 0x0000555555610b5b in redisplay_window (window=XIL(0x5555564fed05), just_this_one_p=true) at xdisp.c:19594 19594 next = find_newline1 (cur, CHAR_TO_BYTE (cur), 0, -1, 1, Value returned is $3 = 10568710 (gdb) finish Run till exit from #0 0x0000555555610b5b in redisplay_window (window=XIL(0x5555564fed05), just_this_one_p=true) at xdisp.c:19594 redisplay_window_1 (window=XIL(0x5555564fed05)) at xdisp.c:17502 17502 return Qnil; (gdb) finish Run till exit from #0 redisplay_window_1 (window=XIL(0x5555564fed05)) at xdisp.c:17502 0x000055555587bb83 in internal_condition_case_1 (bfun=0x5555556086f9 , arg=XIL(0x5555564fed05), handlers=XIL(0x7ffff1b8da2b), hfun=0x555555608402 ) at eval.c:1521 1521 Lisp_Object val = bfun (arg); Value returned is $4 = XIL(0) (gdb) finish Run till exit from #0 0x000055555587bb83 in internal_condition_case_1 (bfun=0x5555556086f9 , arg=XIL(0x5555564fed05), handlers=XIL(0x7ffff1b8da2b), hfun=0x555555608402 ) at eval.c:1521 redisplay_internal () at xdisp.c:17044 17044 if (update_miniwindow_p) Value returned is $5 = XIL(0) (gdb) finish Run till exit from #0 redisplay_internal () at xdisp.c:17044 redisplay () at xdisp.c:16104 16104 } (gdb) finish Run till exit from #0 redisplay () at xdisp.c:16104 read_char (commandflag=1, map=XIL(0x55556c00a123), prev_event=XIL(0), used_mouse_menu=0x7fffffffd3dd, end_time=0x0) at keyboard.c:2645 2645 if (!input_pending) (gdb) finish Run till exit from #0 read_char (commandflag=1, map=XIL(0x55556c00a123), prev_event=XIL(0), used_mouse_menu=0x7fffffffd3dd, end_time=0x0) at keyboard.c:2645 0x00005555557a4ec1 in read_key_sequence (keybuf=0x7fffffffd5d0, prompt=XIL(0), dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false) at keyboard.c:10045 10045 key = read_char (prevent_redisplay ? -2 : NILP (prompt), Value returned is $6 = make_fixnum(106) (gdb) c Continuing. ^Z Thread 1 "emacs" received signal SIGTSTP, Stopped (user). 0x00005555557e4873 in buf_bytepos_to_charpos (b=0x5555602f5ff0, bytepos=10121474) at marker.c:353 353 CONSIDER (tail->bytepos, tail->charpos); (gdb) step 358 if (best_above - bytepos < distance (gdb) finish Run till exit from #0 buf_bytepos_to_charpos (b=0x5555602f5ff0, bytepos=10121474) at marker.c:358 BYTE_TO_CHAR (bytepos=10121474) at /home/yantar92/Git/emacs/src/buffer.h:1053 1053 } Value returned is $7 = 9679581 (gdb) finish Run till exit from #0 BYTE_TO_CHAR (bytepos=10121474) at /home/yantar92/Git/emacs/src/buffer.h:1053 0x000055555581da55 in find_newline1 (start=9679550, start_byte=10121431, end=19968614, end_byte=20651065, count=0, counted=0x7fffffff9480, bytepos=0x0, allow_quit=true) at search.c:3260 3260 return BYTE_TO_CHAR (lim_byte + next); Value returned is $8 = 9679581 (gdb) finish Run till exit from #0 0x000055555581da55 in find_newline1 (start=9679550, start_byte=10121431, end=19968614, end_byte=20651065, count=0, counted=0x7fffffff9480, bytepos=0x0, allow_quit=true) at search.c:3260 0x0000555555610b5b in redisplay_window (window=XIL(0x5555564fed05), just_this_one_p=true) at xdisp.c:19594 19594 next = find_newline1 (cur, CHAR_TO_BYTE (cur), 0, -1, 1, Value returned is $9 = 9679581 (gdb) finish Run till exit from #0 0x0000555555610b5b in redisplay_window (window=XIL(0x5555564fed05), just_this_one_p=true) at xdisp.c:19594 redisplay_window_1 (window=XIL(0x5555564fed05)) at xdisp.c:17502 17502 return Qnil; (gdb) finish Run till exit from #0 redisplay_window_1 (window=XIL(0x5555564fed05)) at xdisp.c:17502 0x000055555587bb83 in internal_condition_case_1 (bfun=0x5555556086f9 , arg=XIL(0x5555564fed05), handlers=XIL(0x7ffff1b8da2b), hfun=0x555555608402 ) at eval.c:1521 1521 Lisp_Object val = bfun (arg); Value returned is $10 = XIL(0) (gdb) finish Run till exit from #0 0x000055555587bb83 in internal_condition_case_1 (bfun=0x5555556086f9 , arg=XIL(0x5555564fed05), handlers=XIL(0x7ffff1b8da2b), hfun=0x555555608402 ) at eval.c:1521 redisplay_internal () at xdisp.c:17044 17044 if (update_miniwindow_p) Value returned is $11 = XIL(0) (gdb) finish Run till exit from #0 redisplay_internal () at xdisp.c:17044 redisplay () at xdisp.c:16104 16104 } (gdb) finish Run till exit from #0 redisplay () at xdisp.c:16104 read_char (commandflag=1, map=XIL(0x55556c7b89c3), prev_event=XIL(0), used_mouse_menu=0x7fffffffd3dd, end_time=0x0) at keyboard.c:2645 2645 if (!input_pending) (gdb) c Continuing. [Detaching after vfork from child process 4901] [Detaching after vfork from child process 4902] [Detaching after vfork from child process 4903] [Detaching after vfork from child process 4904] [Detaching after vfork from child process 4905] [Detaching after vfork from child process 4906] [Thread 0x7fffeb7fe640 (LWP 32537) exited] [Thread 0x7fffebfff640 (LWP 32536) exited] [Thread 0x7ffff0cc4640 (LWP 32535) exited] [Inferior 1 (process 32532) exited normally] (gdb) q -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92 From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 15 10:29:07 2022 Received: (at 57207) by debbugs.gnu.org; 15 Aug 2022 14:29:07 +0000 Received: from localhost ([127.0.0.1]:43770 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNb5W-0003La-SA for submit@debbugs.gnu.org; Mon, 15 Aug 2022 10:29:07 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53458) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNb5U-0003L6-MJ for 57207@debbugs.gnu.org; Mon, 15 Aug 2022 10:29:06 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39890) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNb5P-0004pL-7E; Mon, 15 Aug 2022 10:28:59 -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=EDhaqNod6OgU+7fTQF2gCFRgI8vmYEJfH3jTdNfZHxg=; b=iapa3vAivXh9 sqal8pCb7NgkurncWA6VncBKJ0LTBPHZ8ojuFOgmuTyaJiXgMCzyf3fLqZBFT4Ahzpghame0D7auD iAXXfVnPhd+8kZX8rJOY4jnxEpkMcmCQCm6ENbnqmOngKEvz8A2oehDCbIsnopWH8/+sN1c12Wo5H 2cItChFx+4ZOfdyMllOPeXTElRBTBh8geyrXZz9Vzblic7SSQkv2LZ2i0k/jvsEc4UGaZxVvji/YE 4n8NnGMFaat7tAh0nTy/1vDvtvOEi+nO+VHp/HlSdgtZwGbP1kRoEgugDvKKNAmRjkWdjbggmA2lC 5lc45W/zUJP7vg0Kkfu4HA==; Received: from [87.69.77.57] (port=2156 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 1oNb5N-0001Os-Lm; Mon, 15 Aug 2022 10:28:58 -0400 Date: Mon, 15 Aug 2022 17:28:44 +0300 Message-Id: <83tu6dh97n.fsf@gnu.org> From: Eli Zaretskii To: Ihor Radchenko In-Reply-To: <871qthsiio.fsf@localhost> (message from Ihor Radchenko on Mon, 15 Aug 2022 22:12:15 +0800) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <87tu6d4txk.fsf@localhost> <835yitiucj.fsf@gnu.org> <871qthsiio.fsf@localhost> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: gregory@heytings.org, 57207@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Ihor Radchenko > Cc: gregory@heytings.org, 57207@debbugs.gnu.org > Date: Mon, 15 Aug 2022 22:12:15 +0800 > > > When it hangs, can you attach a debugger to it and try to figure out > > where it loops? The instructions to do so are in etc/DEBUG, under "If > > the symptom of the bug is that Emacs fails to respond". If that > > procedure is more than you can afford, at least post the results of > > "thread apply all bt" after attaching the debugger to a "hung" Emacs. > > Emacs with debugging support is generally slow on my large Org file, but > I think that I managed to get some kind of backtrace with the default > value of long-line-threshold. > > I typed C-z in GDB shell right after triggering the slow operation (it > is headline unfolding in my testing). > > (I did confirm that setting long-line-threshold to nil makes the > unfolding instant) > > The GDB log is below. Hope it gives some clues. It does, and it is the code I suspected was the culprit. 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. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 15 13:08:51 2022 Received: (at 57207) by debbugs.gnu.org; 15 Aug 2022 17:08:51 +0000 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 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 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==; 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 Date: Mon, 15 Aug 2022 20:08:27 +0300 Message-Id: <83mtc5h1tg.fsf@gnu.org> From: Eli Zaretskii To: yantar92@gmail.com In-Reply-To: <83tu6dh97n.fsf@gnu.org> (message from Eli Zaretskii on Mon, 15 Aug 2022 17:28:44 +0300) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <87tu6d4txk.fsf@localhost> <835yitiucj.fsf@gnu.org> <871qthsiio.fsf@localhost> <83tu6dh97n.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: gregory@heytings.org, 57207@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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); From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 16 05:37:27 2022 Received: (at 57207) by debbugs.gnu.org; 16 Aug 2022 09:37:27 +0000 Received: from localhost ([127.0.0.1]:44803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNt0p-0000vW-B3 for submit@debbugs.gnu.org; Tue, 16 Aug 2022 05:37:27 -0400 Received: from mail-pf1-f181.google.com ([209.85.210.181]:44944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNt0m-0000vI-NI for 57207@debbugs.gnu.org; Tue, 16 Aug 2022 05:37:26 -0400 Received: by mail-pf1-f181.google.com with SMTP id h28so8859782pfq.11 for <57207@debbugs.gnu.org>; Tue, 16 Aug 2022 02:37:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc; bh=ipkt2U55Yg8G2Bt6JWfPY4UGASDq6JNAcXFV+d2NGB8=; b=aXIPHsot9KoVKlo0vU8Q1qH9qVW9K1SmmHB7fGLZdiLKPyPqslRUyvemz+FpbfBoHo Q+pLWpz5cpIvecWyl0N2Wmqjqpvh8H2irAloM+Zyt3e8fIxGpbYxBtSsQBihNKydoEc7 WJtM/ZMReaizOC6pH+04GogB0lkMxm638ngAPbJJHuDWKhFJrdcrtuucXGE7W0FvRlVG 2kbCO3G7/9noa6diAha6sFGa3fY6S/BVkXf9CW6Sd1jyfAZ3X6yOzauqweeUv6NWlQ01 CLQE85Prp2J1ouQknfnA70ikNfqj4RtX622pOkzVI9h/D389phZWrJ1+uuBk/IhBVMMi SMkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc; bh=ipkt2U55Yg8G2Bt6JWfPY4UGASDq6JNAcXFV+d2NGB8=; b=iTmobncr/BkBmEMjkyAYu/UwdqYrG+u7w4CyI6zQq+6ZheUOZRcFRhhImvUr0RMWVW o4KYdayn/fQoroVKW2iAqHUsUDlNl8sfLo43rEYlS+qGVhtFE0DWMXXJv9DOkQXNlT6s x28sVBNAjNnb6Y+pKnLkRAHZheG0aFoRTPZDPznMyogf6MkSRn43buQNxldAL4AYfzzG yAl4vTWu2w5qsbFiqhMwiNcC4tAEmDB44YwrAgltfu7Xsr66ExNNb0kZxqpgpVMBkmkx Z/cfVczDBiXnKp1pLRxnstJ6ZE97p5o7Xgef/egYbsf1oa8v87bRYmC82f5wwYqtSZ1x G/BA== X-Gm-Message-State: ACgBeo2wgeI0I9Cl76BkzUKaPgKCuDyezCgQWVfk1BgUFaU/VJCRfGEu MDJNV/ACGRFpsF7aV2wMFK0= X-Google-Smtp-Source: AA6agR4uEYuZq2fCeDbFyEG39a1e6o1F0FuI9P0AfcMrKqSAjlRGn8YM1ThK0PWMiQjii49hPWlPaQ== X-Received: by 2002:a63:3cc:0:b0:41d:7ab5:ca2f with SMTP id 195-20020a6303cc000000b0041d7ab5ca2fmr17393885pgd.559.1660642638794; Tue, 16 Aug 2022 02:37:18 -0700 (PDT) Received: from localhost ([115.154.175.57]) by smtp.gmail.com with ESMTPSA id q7-20020aa79607000000b0052d0a93f6d5sm7988019pfg.116.2022.08.16.02.37.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Aug 2022 02:37:18 -0700 (PDT) From: Ihor Radchenko To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <83tu6dh97n.fsf@gnu.org> References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <87tu6d4txk.fsf@localhost> <835yitiucj.fsf@gnu.org> <871qthsiio.fsf@localhost> <83tu6dh97n.fsf@gnu.org> Date: Tue, 16 Aug 2022 17:38:22 +0800 Message-ID: <87zgg434vl.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 57207 Cc: gregory@heytings.org, 57207@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Eli Zaretskii writes: > Can you tell some statistics about the lines in that file: > > . how many lines? 480,905 > . how many lines longer than 10000 characters? 0 > . how many lines longer than 100000 characters? 0 The longest line in that file is 5003 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. I will try, but it may take some time. The file in question contains some sensitive information. -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92 From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 16 05:38:27 2022 Received: (at 57207) by debbugs.gnu.org; 16 Aug 2022 09:38:27 +0000 Received: from localhost ([127.0.0.1]:44807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNt1m-0000x9-PY for submit@debbugs.gnu.org; Tue, 16 Aug 2022 05:38:27 -0400 Received: from mail-pf1-f178.google.com ([209.85.210.178]:39641) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNt1j-0000wt-Lw for 57207@debbugs.gnu.org; Tue, 16 Aug 2022 05:38:25 -0400 Received: by mail-pf1-f178.google.com with SMTP id 130so8616296pfy.6 for <57207@debbugs.gnu.org>; Tue, 16 Aug 2022 02:38:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc; bh=WCK4h0vBsodY/PPstIk+Ze0uGDcReMQTdpUFCCY1OCg=; b=Ypto8R3pOD4uhZ4nexBMaJnOWcy7CemnMtvtgpT70Beqk79ErnzDu5vBjT17bp8+rJ t4XOd8YHy+GONfApbpNzVCi9jLStpKKoDMnSgVJ+HYBpwy2JnKBDAURQg1y7IDPZ7FI8 ORN2F7pHaooVuo2YY06igBbEX/34frBi38AoUC+LsHX/jT+bL0rN6Y8I15e3TbGPYCmF 6C4mSOukdX/d/0+VCw4OeZbwvcGwM0ig9k3Sv2BAVjQJ64ZZEolEi9YO4+kPaw5OSM2Y cOfcbmJsuL4ow4KAH0vLRBrUITCn1GHlYJtvk+iLWzXxJAB6kTQT4hOC+F9T/sEcwwWy sX6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc; bh=WCK4h0vBsodY/PPstIk+Ze0uGDcReMQTdpUFCCY1OCg=; b=iBUzQS45IVFVdjsTn+HfnpoRRv8G5HCCSMUchOG2srVGt7+2ildFVKr+MNxYYgkgIV LGXcTmihHzA1FrIFlimthr78VXhq7Ey45h0cwy0cO5tLuY4ux8LecVENPcb93HdG25Ez akDUdpGAlWkh8NfYg8vRIUW45MsrDFA7NbS4xQQRonbxT4GWJtFaix52O8OQCejKHsEg KN1m8wZjuw/JHafG2yTSvqT/SNYeZBrqX2IN+20c+lJ09Noo+4rDT3sF9jUdVjMGqGBL L5UtuVjxiCugl3LXY/Bb3uAyM7dM+Ave2qLGgU2t2193A68IXUKi96DXljeV9vC8cXB2 lVsg== X-Gm-Message-State: ACgBeo037m2yqmORVzY8KTvLL3+I9prImDQ8oECsFjAqjjg4mIzR7TWD Q3kq68BA6+fAxSk2bc98DQY= X-Google-Smtp-Source: AA6agR5LAwKtpCQgXn6/Yeuhk3X5lDTvFhPIRtlung+xxv6VozhE05Tzim1rs7C2yCO+17Ae3663wQ== X-Received: by 2002:a65:6290:0:b0:422:4a8f:c687 with SMTP id f16-20020a656290000000b004224a8fc687mr16012298pgv.57.1660642698068; Tue, 16 Aug 2022 02:38:18 -0700 (PDT) Received: from localhost ([115.154.175.57]) by smtp.gmail.com with ESMTPSA id k4-20020a170902c40400b0016d21697ed9sm8565466plk.48.2022.08.16.02.38.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Aug 2022 02:38:17 -0700 (PDT) From: Ihor Radchenko To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <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> <83mtc5h1tg.fsf@gnu.org> Date: Tue, 16 Aug 2022 17:39:22 +0800 Message-ID: <87v8qs34tx.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 57207 Cc: gregory@heytings.org, 57207@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Eli Zaretskii writes: > Does the patch below fix the issue? Nope, unfortunately. -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92 From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 16 06:47:04 2022 Received: (at 57207) by debbugs.gnu.org; 16 Aug 2022 10:47:04 +0000 Received: from localhost ([127.0.0.1]:45053 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNu6B-0003K9-Qm for submit@debbugs.gnu.org; Tue, 16 Aug 2022 06:47:04 -0400 Received: from heytings.org ([95.142.160.155]:55566) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNu69-0003Jk-QI for 57207@debbugs.gnu.org; Tue, 16 Aug 2022 06:47:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1660646820; bh=Bb52SaZysO6BvzgiHtONdcTUZnntmp8C06lAxDKF7eQ=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=h7USxizKsXTgF6+dvW4gQ1GbSj9yntKsNZzZEabSdTq5fqg1zyJwgvnToXThr7k5Q f/EO6dkoXrfj8SLHXmMRk4SSUVaVVwzN2oHP1tBuGPJGGsEljLFofA+OT676gCYMA2 cHqd6idWXYRMUj/xudwAJCYhFQDiGFZ9CUCby7kFW17t1H1l9uc25Z+JpeE5WtRScN 4yeSRlW9gg5yLXOhyPyA05sal2ymQGGHUmwimOLdgPFsMHswPNaT4vGaIDUwtMXLXH KDs5s80YHfPeLUijyKLE5zTH17WZPbk/ax8/MAdGumevxYH1KMU+uMwEu4qEaHmhSS l7P+Quo0gcJ0w== Date: Tue, 16 Aug 2022 10:47:00 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <83bksmka08.fsf@gnu.org> Message-ID: <325f95fd2b7c0cc80613@heytings.org> References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <83bksmka08.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="oXy2Hht2lr" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --oXy2Hht2lr Content-Type: text/plain; charset=us-ascii; format=flowed > > Gregory, I suspect that the problem could be in the loop in > redisplay_window, where we look for long lines. Changing visibility in > Org changes text properties, and that causes MODIFF to be incremented. > I actually can cause something similar without Org at all, just by > scrolling fast through xdisp.c. You can put a breakpoint inside the > 'if' that guards the re-evaluation of the long-lines in > redisplay_window, and scroll with C-v through xdisp.c immediately after > visiting it -- I hit the breakpoint from time to time, although there > are no changes to the buffer except faces placed by fontifications. > > jit-lock runs under with-silent-modifications, but that only adjusts > SAVE_MODIFF to create an illusion of unchanged buffer, it doesn't affect > UNCHANGED_MODIFIED. > Indeed, that's problematic: modify_text_properties calls modiff_incr (&MODIFF, 1). I think the safest change would be to use CHARS_MODIFF instead of MODIFF, see attached. Ihor, can you please test that patch and tell us if it solves your problem? --oXy2Hht2lr Content-Type: text/x-diff; name=use_chars_modiff.patch Content-Transfer-Encoding: base64 Content-ID: <325f95fd2b8536a8bdbb@heytings.org> Content-Disposition: attachment; filename=use_chars_modiff.patch ZGlmZiAtLWdpdCBhL3NyYy9idWZmZXIuaCBiL3NyYy9idWZmZXIuaA0KaW5k ZXggNDdiNGJkZjc0OS4uNzdmOWVhMjBhZiAxMDA2NDQNCi0tLSBhL3NyYy9i dWZmZXIuaA0KKysrIGIvc3JjL2J1ZmZlci5oDQpAQCAtMTQ5LDEyICsxNDks MTggQEAgI2RlZmluZSBCVUZfT1ZFUkxBWV9VTkNIQU5HRURfTU9ESUZJRUQo YnVmKSBcDQogI2RlZmluZSBCVUZfQkVHX1VOQ0hBTkdFRChidWYpICgoYnVm KS0+dGV4dC0+YmVnX3VuY2hhbmdlZCkNCiAjZGVmaW5lIEJVRl9FTkRfVU5D SEFOR0VEKGJ1ZikgKChidWYpLT50ZXh0LT5lbmRfdW5jaGFuZ2VkKQ0KIA0K KyNkZWZpbmUgQlVGX0NIQVJTX1VOQ0hBTkdFRF9NT0RJRklFRChidWYpIFwN CisgICgoYnVmKS0+dGV4dC0+Y2hhcnNfdW5jaGFuZ2VkX21vZGlmaWVkKQ0K Kw0KICNkZWZpbmUgVU5DSEFOR0VEX01PRElGSUVEIFwNCiAgIEJVRl9VTkNI QU5HRURfTU9ESUZJRUQgKGN1cnJlbnRfYnVmZmVyKQ0KICNkZWZpbmUgT1ZF UkxBWV9VTkNIQU5HRURfTU9ESUZJRUQgXA0KICAgQlVGX09WRVJMQVlfVU5D SEFOR0VEX01PRElGSUVEIChjdXJyZW50X2J1ZmZlcikNCiAjZGVmaW5lIEJF R19VTkNIQU5HRUQgQlVGX0JFR19VTkNIQU5HRUQgKGN1cnJlbnRfYnVmZmVy KQ0KICNkZWZpbmUgRU5EX1VOQ0hBTkdFRCBCVUZfRU5EX1VOQ0hBTkdFRCAo Y3VycmVudF9idWZmZXIpDQorDQorI2RlZmluZSBDSEFSU19VTkNIQU5HRURf TU9ESUZJRUQgXA0KKyAgQlVGX0NIQVJTX1VOQ0hBTkdFRF9NT0RJRklFRCAo Y3VycmVudF9idWZmZXIpDQogDA0KIC8qIEZ1bmN0aW9ucyB0byBzZXQgUFQg aW4gdGhlIGN1cnJlbnQgYnVmZmVyLCBvciBhbm90aGVyIGJ1ZmZlci4gICov DQogDQpAQCAtMjY4LDYgKzI3NCw5IEBAICNkZWZpbmUgRkVUQ0hfQllURShu KSAqKEJZVEVfUE9TX0FERFIgKChuKSkpDQogICAgICAgIGVuZF91bmNoYW5n ZWQgY29udGFpbiBubyB1c2VmdWwgaW5mb3JtYXRpb24uICAqLw0KICAgICBt b2RpZmZfY291bnQgb3ZlcmxheV91bmNoYW5nZWRfbW9kaWZpZWQ7DQogDQor ICAgIC8qIENIQVJTX01PRElGRiBhcyBvZiBsYXN0IHJlZGlzcGxheSB0aGF0 IGZpbmlzaGVkLiAgKi8NCisgICAgbW9kaWZmX2NvdW50IGNoYXJzX3VuY2hh bmdlZF9tb2RpZmllZDsNCisNCiAgICAgLyogUHJvcGVydGllcyBvZiB0aGlz IGJ1ZmZlcidzIHRleHQuICAqLw0KICAgICBJTlRFUlZBTCBpbnRlcnZhbHM7 DQogDQpkaWZmIC0tZ2l0IGEvc3JjL3hkaXNwLmMgYi9zcmMveGRpc3AuYw0K aW5kZXggMDI0OGU4ZTUzZi4uYzkyMjMxYWJjZiAxMDA2NDQNCi0tLSBhL3Ny Yy94ZGlzcC5jDQorKysgYi9zcmMveGRpc3AuYw0KQEAgLTE3MzIzLDYgKzE3 MzIzLDcgQEAgbWFya193aW5kb3dfZGlzcGxheV9hY2N1cmF0ZV8xIChzdHJ1 Y3Qgd2luZG93ICp3LCBib29sIGFjY3VyYXRlX3ApDQogDQogICAgICAgQlVG X1VOQ0hBTkdFRF9NT0RJRklFRCAoYikgPSBCVUZfTU9ESUZGIChiKTsNCiAg ICAgICBCVUZfT1ZFUkxBWV9VTkNIQU5HRURfTU9ESUZJRUQgKGIpID0gQlVG X09WRVJMQVlfTU9ESUZGIChiKTsNCisgICAgICBCVUZfQ0hBUlNfVU5DSEFO R0VEX01PRElGSUVEIChiKSA9IEJVRl9DSEFSU19NT0RJRkYgKGIpOw0KICAg ICAgIEJVRl9CRUdfVU5DSEFOR0VEIChiKSA9IEJVRl9HUFQgKGIpIC0gQlVG X0JFRyAoYik7DQogICAgICAgQlVGX0VORF9VTkNIQU5HRUQgKGIpID0gQlVG X1ogKGIpIC0gQlVGX0dQVCAoYik7DQogDQpAQCAtMTk1ODUsNyArMTk1ODYs NyBAQCByZWRpc3BsYXlfd2luZG93IChMaXNwX09iamVjdCB3aW5kb3csIGJv b2wganVzdF90aGlzX29uZV9wKQ0KICAgLyogQ2hlY2sgd2hldGhlciB0aGUg YnVmZmVyIHRvIGJlIGRpc3BsYXllZCBjb250YWlucyBsb25nIGxpbmVzLiAg Ki8NCiAgIGlmICghTklMUCAoVmxvbmdfbGluZV90aHJlc2hvbGQpDQogICAg ICAgJiYgIWN1cnJlbnRfYnVmZmVyLT5sb25nX2xpbmVfb3B0aW1pemF0aW9u c19wDQotICAgICAgJiYgTU9ESUZGIC0gVU5DSEFOR0VEX01PRElGSUVEID4g OCkNCisgICAgICAmJiBDSEFSU19NT0RJRkYgLSBDSEFSU19VTkNIQU5HRURf TU9ESUZJRUQgPiA4KQ0KICAgICB7DQogICAgICAgcHRyZGlmZl90IGN1ciwg bmV4dCwgZm91bmQsIG1heCA9IDAsIHRocmVzaG9sZDsNCiAgICAgICB0aHJl c2hvbGQgPSBYRklYTlVNIChWbG9uZ19saW5lX3RocmVzaG9sZCk7DQo= --oXy2Hht2lr-- From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 16 07:56:17 2022 Received: (at 57207) by debbugs.gnu.org; 16 Aug 2022 11:56:17 +0000 Received: from localhost ([127.0.0.1]:45141 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNvBB-0007I2-1U for submit@debbugs.gnu.org; Tue, 16 Aug 2022 07:56:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60630) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNvB8-0007Ho-Fg for 57207@debbugs.gnu.org; Tue, 16 Aug 2022 07:56:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50720) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNvB2-0005eB-V0; Tue, 16 Aug 2022 07:56:08 -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=YTB9lpFdRQGh+vmfKpksQrq1Tn0lNo2Z/qwFZJbVdH4=; b=n33IAk7UCZXa ohyhCEod/To95XXNYxZmkVv4i5Y63Ji7HrFKPsoDmRwPKc6cw6/j83TcJ5tfAkIotugtsVgG7ISRu B0XHk2/U82XYwn7itRmVHAGGD42mVNQEagIzquqq6uwRZQzBHEzcqjbGjRcedd7H/WUFqabHgAaSO oIMcYSwZehYKuDAJnWrhvzt6WC+TnWyk6S2oOh6eoHNkNFNIGmxTqCIiF/9xrF/OP+Q9VqXE0bh9Z CI6SVlPu1CHysLN8pDMQ9Rv4SMhGiVI6SYBmzpPf4xqWiVWtYVw/p2y9dqAeGVpXUYhBhsmD8KyvK yCKNpqBPXQH+MejWxUa6kA==; Received: from [87.69.77.57] (port=4923 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 1oNvB1-0006Z3-Ux; Tue, 16 Aug 2022 07:56:08 -0400 Date: Tue, 16 Aug 2022 14:55:56 +0300 Message-Id: <83y1voflmb.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings In-Reply-To: <325f95fd2b7c0cc80613@heytings.org> (message from Gregory Heytings on Tue, 16 Aug 2022 10:47:00 +0000) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <83bksmka08.fsf@gnu.org> <325f95fd2b7c0cc80613@heytings.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Tue, 16 Aug 2022 10:47:00 +0000 > From: Gregory Heytings > cc: yantar92@gmail.com, 57207@debbugs.gnu.org > > > Gregory, I suspect that the problem could be in the loop in > > redisplay_window, where we look for long lines. Changing visibility in > > Org changes text properties, and that causes MODIFF to be incremented. > > I actually can cause something similar without Org at all, just by > > scrolling fast through xdisp.c. You can put a breakpoint inside the > > 'if' that guards the re-evaluation of the long-lines in > > redisplay_window, and scroll with C-v through xdisp.c immediately after > > visiting it -- I hit the breakpoint from time to time, although there > > are no changes to the buffer except faces placed by fontifications. > > > > jit-lock runs under with-silent-modifications, but that only adjusts > > SAVE_MODIFF to create an illusion of unchanged buffer, it doesn't affect > > UNCHANGED_MODIFIED. > > > > Indeed, that's problematic: modify_text_properties calls modiff_incr > (&MODIFF, 1). I think the safest change would be to use CHARS_MODIFF > instead of MODIFF, see attached. As I said earlier, I've changed my mind about this after I wrote the above. We update UNCHANGED_MODIFIED in mark_window_display_accurate_1, so if the window completes its redisplay cycle "normally", whatever jit-lock does shouldn't matter for the next redisplay cycle, because UNCHANGED_MODIFIED will be updated from MODIFF. Maybe Org does something that frequently causes a window's redisplay cycle to end prematurely, in which case the code that looks for long lines could be called too frequently. But in that case, your proposed change will have the same problem, I think? What I don't understand is why enlarging the value of the threshold causes Emacs to "hang". If it really is some kind of infloop, I cannot understand how issues like outdated UNCHANGED_MODIFIED could cause that only for some value of the threshold, but not for a smaller value. I thought perhaps there are lines longer than 10000 characters, but none beyond 100000, but this turns out to be false, so with both values of the threshold that loop in redisplay_window should have scanned the entire buffer top to bottom in both cases... So I suspect something else is at work here. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 16 08:15:40 2022 Received: (at 57207) by debbugs.gnu.org; 16 Aug 2022 12:15:41 +0000 Received: from localhost ([127.0.0.1]:45162 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNvTw-0007lZ-HV for submit@debbugs.gnu.org; Tue, 16 Aug 2022 08:15:40 -0400 Received: from mail-pj1-f46.google.com ([209.85.216.46]:55823) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNvTr-0007lK-Sv for 57207@debbugs.gnu.org; Tue, 16 Aug 2022 08:15:38 -0400 Received: by mail-pj1-f46.google.com with SMTP id a8so9573811pjg.5 for <57207@debbugs.gnu.org>; Tue, 16 Aug 2022 05:15:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc; bh=ejg/x+kRQWXj6hR3N4MWWcfjX/5HYr+pS3UK8c/ZgAg=; b=jz7af3ya0fgVcuehh+XHV6CgeQGp+t5MHNttVpSQK79YLWuk4yGwnR13os69a6ULiR RfrfaqWLtJSmeFkRv6PRNOuh0CBv6yUKVq5udDQn4in228mQLj+x2izbXwRyxZ5oWtHc vDh3smrUWX5PwXELNfovtjQulnOY+OCN7hLJ2GtkoGpEuW029IrTVGyXhI/AfhUpgkPO 8Yc9mmDz9rolcBSPUMh+nZmmw0HWpg2hMrppJvFLvUziMrWCt/NtXqaLDaogsA1SFpNP ZXzT0MkL9aXzz60pZ4OB8I7zafQyZ/cmN53wmZ4ylyrMRHN3K+20Yg1RnMrz1vvIdnim X6Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc; bh=ejg/x+kRQWXj6hR3N4MWWcfjX/5HYr+pS3UK8c/ZgAg=; b=aqLrT+AAVnGxK+VIaQc1NDPxL00QFnL1J0HN60FJBoibBk/9EwBQv16Ck/6Spm73Xl GcDGZt6xWfQhRAipjcdtCHTJ3wi9QjZpZVk9GrBMYw/BgmSvAPHUEWR2GpncK3ylQkCb PLfhwIyJUcIXzJcAp0znYjw2h9T/nvWVSUntyJKubko3uU/CYsxx4hXoWLZBzboCeG// 8QpDzvIMv5+qpWLJOZsIM8qYDwqM/DDQfhqw81MfZTkgVWwtpf4tsATXhcjIEksl2+47 lKU9Au9+0SypU2DEoXICO/+KUWjX76UVU24oxsHxgBzVn4CWKgy1TrkeWF87K5C74kmf PObA== X-Gm-Message-State: ACgBeo3ur1cp3SZN18ai6n0PRDWyN4vgUGmkMowx884Z8wHxzxUL8Jpk ySq33dR+VCsfsde8Rfaw0zM= X-Google-Smtp-Source: AA6agR4jwcHPQWCR7aiC7bSTCMkgUbr2W7U6truekxIlv4H1lIATwtI6M/sd9luxFYBWbOB4dryj6w== X-Received: by 2002:a17:902:db06:b0:16f:16b7:69d0 with SMTP id m6-20020a170902db0600b0016f16b769d0mr21527870plx.145.1660652129961; Tue, 16 Aug 2022 05:15:29 -0700 (PDT) Received: from localhost ([2409:8a70:2bf:80b0:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id g8-20020aa796a8000000b0050dc76281e0sm8300511pfk.186.2022.08.16.05.15.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Aug 2022 05:15:28 -0700 (PDT) From: Ihor Radchenko To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <83y1voflmb.fsf@gnu.org> References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <83bksmka08.fsf@gnu.org> <325f95fd2b7c0cc80613@heytings.org> <83y1voflmb.fsf@gnu.org> Date: Tue, 16 Aug 2022 20:16:23 +0800 Message-ID: <87wnb81izs.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 57207 Cc: Gregory Heytings , 57207@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Eli Zaretskii writes: > What I don't understand is why enlarging the value of the threshold > causes Emacs to "hang". If it really is some kind of infloop, I > cannot understand how issues like outdated UNCHANGED_MODIFIED could > cause that only for some value of the threshold, but not for a smaller > value. I thought perhaps there are lines longer than 10000 > characters, but none beyond 100000, but this turns out to be false, so > with both values of the threshold that loop in redisplay_window should > have scanned the entire buffer top to bottom in both cases... > > So I suspect something else is at work here. Clarification: I was unable to trigger the hang again. I am not sure what I did the first time (I played with long-line-threshold values inside the same Org buffer), but I suspect that there were also some errors raised in the Org fontification code - parts of the buffer got wrong fontification just before the hang. Of course, these errors are probably also an indication that something is going wrong, but the hang may not be directly related to the slowdown. Throughout my today's attempts to reproduce, I did not see any obvious difference in the slowdown between 10000 and 100000 long-line-threshold values. -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92 From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 16 08:17:14 2022 Received: (at 57207) by debbugs.gnu.org; 16 Aug 2022 12:17:14 +0000 Received: from localhost ([127.0.0.1]:45167 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNvVS-0007oL-1s for submit@debbugs.gnu.org; Tue, 16 Aug 2022 08:17:14 -0400 Received: from heytings.org ([95.142.160.155]:55712) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNvVQ-0007oC-Lt for 57207@debbugs.gnu.org; Tue, 16 Aug 2022 08:17:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1660652231; bh=DZFUnWb7Lv8/HAsiU4NX+Hu5IihfeXz/MvTwxocA6Bg=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=QuOobmETWnwMdttASqDZpFLUoi2nVT/YSoTlBHtaDMzMR+SMtHMutZqa2/32yyzjI NzIzyVRrpGryrt04V8sCRGuOGZDSwzfFgDKaAjmNrNcmf21ltBy80iv9YSih2veA2r d2+AeWT2owOsg8I4ie2UvquNZuQmvDQd8Ze1CPPidhesMDmU5hes7MOZyTNUe3hzp7 l972aSJ9Qp/aHoZjUs0syJ7u0CJkyrUHi5NtY2RBgC7tyitQfuSX8vqOlMnTq+VXTZ 83KMyVqzQjhndKIucOvsg/vtVZZXOJ6AYvuq4pRU835MV616KVo3qYmPaS4yMUOxhX KnWwEGoXdT0rg== Date: Tue, 16 Aug 2022 12:17:10 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <83y1voflmb.fsf@gnu.org> Message-ID: <325f95fd2bce114fd74d@heytings.org> References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <83bksmka08.fsf@gnu.org> <325f95fd2b7c0cc80613@heytings.org> <83y1voflmb.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > > As I said earlier, I've changed my mind about this after I wrote the > above. > I did see that, yes. > > We update UNCHANGED_MODIFIED in mark_window_display_accurate_1, so if > the window completes its redisplay cycle "normally", whatever jit-lock > does shouldn't matter for the next redisplay cycle, because > UNCHANGED_MODIFIED will be updated from MODIFF. > Hmmm... The fact is that using CHARS_MODIFF avoids rescanning the buffer when "too many" text properties are changed. With xdisp.c, the long lines detection code is not called anymore when scrolling through the (initially unfontified) buffer. The original bug description (additional delays between redisplay cycles in a large buffer) is probably caused by needlessly executing that long lines detection code, at least that's consistent with my earlier experiments. > > Maybe Org does something that frequently causes a window's redisplay > cycle to end prematurely, in which case the code that looks for long > lines could be called too frequently. But in that case, your proposed > change will have the same problem, I think? > That's possible indeed, let's see what Ihor tells us. > > What I don't understand is why enlarging the value of the threshold > causes Emacs to "hang". If it really is some kind of infloop, I cannot > understand how issues like outdated UNCHANGED_MODIFIED could cause that > only for some value of the threshold, but not for a smaller value. I > thought perhaps there are lines longer than 10000 characters, but none > beyond 100000, but this turns out to be false, so with both values of > the threshold that loop in redisplay_window should have scanned the > entire buffer top to bottom in both cases... > > So I suspect something else is at work here. > Yes, I suspect that this is another bug, separate from the original bug Ihor described. It might be a bug in find_newline1, in the backtrace he sent, find_newline1 returns 10568710 and later 9679581. It's not clear however if that's in the same loop (he asked gdb to "continue" between the two). From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 16 08:24:48 2022 Received: (at 57207) by debbugs.gnu.org; 16 Aug 2022 12:24:48 +0000 Received: from localhost ([127.0.0.1]:45177 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNvcm-0007zw-DX for submit@debbugs.gnu.org; Tue, 16 Aug 2022 08:24:48 -0400 Received: from heytings.org ([95.142.160.155]:55726) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNvck-0007zn-6j for 57207@debbugs.gnu.org; Tue, 16 Aug 2022 08:24:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1660652685; bh=IUci4ZDsVljmPiwXvciSp9sLMVaSehpOy8T5GD//yWw=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=TVu5DwGtncSThcUw3kfNW1LrF4RlQIUgJHsfLt8yJ/ovevXTDtOtcF7Qw7Dqg3Lik AELLz4Zj8An7J7mVGcJfE/mgMD/uHocbE36WCT6pB4ifBuHMUqV1fPaujFXJLICmEc ccqJaLx9zl9W53JRS2UNU5w7m31iE8qkcuqeVV4K1UjKrkNplRGOD89IZKtxOgjKXn u7NOGyv39Eap7uyjgdjkjKREsZ8XEHTM8kqfqWWAFKFXhF1DObaqOZeJeDN2uGomsa z8BmKPvSTOtLmmkK8/JHGcW9eyzc81Zrt83gtRbmxzbwPJXVydRMukic9M+TT84SqP vxFsOdEy7N50w== Date: Tue, 16 Aug 2022 12:24:44 +0000 From: Gregory Heytings To: Ihor Radchenko Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <87wnb81izs.fsf@localhost> Message-ID: <325f95fd2bca916950fe@heytings.org> References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <83bksmka08.fsf@gnu.org> <325f95fd2b7c0cc80613@heytings.org> <83y1voflmb.fsf@gnu.org> <87wnb81izs.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 57207 Cc: Eli Zaretskii , 57207@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > > Clarification: I was unable to trigger the hang again. I am not sure > what I did the first time (I played with long-line-threshold values > inside the same Org buffer), > That wouldn't work (or at least it might not do what you expect): once a too long line has been found in the buffer the long line optimizations are enabled, and long lines are not detected anymore. > > but I suspect that there were also some errors raised in the Org > fontification code - parts of the buffer got wrong fontification just > before the hang. Of course, these errors are probably also an indication > that something is going wrong, but the hang may not be directly related > to the slowdown. > > Throughout my today's attempts to reproduce, I did not see any obvious > difference in the slowdown between 10000 and 100000 long-line-threshold > values. > Okay, so my guess is that it's in fact something in the Org fontification code which infloops when locked narrowing is enabled. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 16 08:28:06 2022 Received: (at 57207) by debbugs.gnu.org; 16 Aug 2022 12:28:06 +0000 Received: from localhost ([127.0.0.1]:45185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNvfy-00085M-CZ for submit@debbugs.gnu.org; Tue, 16 Aug 2022 08:28:06 -0400 Received: from mail-pj1-f52.google.com ([209.85.216.52]:55014) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNvfu-00084q-Iy for 57207@debbugs.gnu.org; Tue, 16 Aug 2022 08:28:06 -0400 Received: by mail-pj1-f52.google.com with SMTP id gp7so9606539pjb.4 for <57207@debbugs.gnu.org>; Tue, 16 Aug 2022 05:28:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc; bh=L/JZbtHwRtVKCRiG08mRAKn6NKhe1KSqrME+3jkd3ck=; b=jGTfNlnXGQ1pVfqVLunvt22MHsfp1STO0JG7vRURw/TwPPg3MVLADh79M5Oh+zGkIc BlTRbT/CfCfxQZ9tHymTR5c9Ae0ECOalf/iDtAQ+FZrT0ccGDvN7Re9ShsMio6cPi40r P/S4fjGm7C4IEwEHmuUriyFlE7l2Ow5kvNFHbbp0gfMVrUbsHw2WHRzIVL6q9OCjbzSx nUPF4IlWXhEE791QiIvpC81EpkL2Kv1f/2qGPOtf1hUY217hTY44YK11FWjMUkl1rvBk Wtg+Q8djqg4imfukl9FvC8OroDgeq/cIpaTqMTqIchlBmzveAm9vrB1hPXcdzVIo/M5A n5Hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc; bh=L/JZbtHwRtVKCRiG08mRAKn6NKhe1KSqrME+3jkd3ck=; b=kEsjqsuXjyZLEN6fpU+5lH13GVTiKYgKGS5bKu+L4eKPZyMdxYjjHfxLtNyl8jPPgw fYtKBXtWEdL+6sV1t2CYoM2P2t9u74K57x/ls/DD/UoxkQJMnE74yolySwyvwQOKJGB/ 4y8soDVVuVwuvFj1Zp2om0EWvALCh76HuPF0va+NPNVDPWZNdfizUFYPlHHYL1kgHNTk bEXBTXurZHX0kFEHlSICyj9UanwKm+cCBod1LK6igg3SrUehGWBeFpKDbfSE5Ds/xg+E cSDTLPsYR/mAzZouF+LRfylehcvBs2wrHI+TIKrYryHS5Ft9BcRgxnADP0PRvb4OJ3c2 D+eA== X-Gm-Message-State: ACgBeo0CuKVUBSfzZmHpDBgnYFVef8WatRTbsSbbpqhFiyRlgTCSDbQF WbsNvmcaEqpifGy81isSU48= X-Google-Smtp-Source: AA6agR6yWdIVnHcfNmI/7alvgvIhSMpXeqbGTLRJm+twbhUWpJcaLkIDKarZX1DA3FnuK92boW/GKQ== X-Received: by 2002:a17:90b:390f:b0:1f4:e394:8c18 with SMTP id ob15-20020a17090b390f00b001f4e3948c18mr22771094pjb.141.1660652876782; Tue, 16 Aug 2022 05:27:56 -0700 (PDT) Received: from localhost ([2409:8a70:2bf:80b0:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id u5-20020a170903124500b00162529828aesm8987472plh.109.2022.08.16.05.27.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Aug 2022 05:27:56 -0700 (PDT) From: Ihor Radchenko To: Gregory Heytings Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <325f95fd2bce114fd74d@heytings.org> References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <83bksmka08.fsf@gnu.org> <325f95fd2b7c0cc80613@heytings.org> <83y1voflmb.fsf@gnu.org> <325f95fd2bce114fd74d@heytings.org> Date: Tue, 16 Aug 2022 20:28:57 +0800 Message-ID: <87r11g1ieu.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 57207 Cc: Eli Zaretskii , 57207@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Gregory Heytings writes: >> Maybe Org does something that frequently causes a window's redisplay >> cycle to end prematurely, in which case the code that looks for long >> lines could be called too frequently. But in that case, your proposed >> change will have the same problem, I think? >> > > That's possible indeed, let's see what Ihor tells us. I'm afraid that my knowledge of Emacs redisplay is not sufficient to give any insight. I have no clue what "redisplay cycle end prematurely" means and how it can be triggered. -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92 From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 16 08:33:44 2022 Received: (at 57207) by debbugs.gnu.org; 16 Aug 2022 12:33:44 +0000 Received: from localhost ([127.0.0.1]:45191 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNvlQ-0008Er-4V for submit@debbugs.gnu.org; Tue, 16 Aug 2022 08:33:44 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40660) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNvlK-0008EZ-Hi for 57207@debbugs.gnu.org; Tue, 16 Aug 2022 08:33:42 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49940) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNvlF-0002lX-4B; Tue, 16 Aug 2022 08:33:33 -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=u5U1A+YjNfhggM0rGXg9smVDOCIqjx9iuyXCVZpxbUA=; b=W+DAuZxOUvTy 7YWwkkz5UVOcagbxp5BvmxX0fKm1syrCwfpw4S4tsIDWC2HYGtj5Gkq5i1235gNsQGFVjVwlExeRj scRL20zKvPKn48jiyh13PHP7lpgDgExtZUD5VBqMBG7UfmCt241JPVvC7aF+y1cy1Gnh1gph8MnN8 +k+od2mCVLELGNdAbQJjj4/LsERxuqNOrgCxw0KF0JOcqVVejdz8Gd7KoPPWfWry8zDrmM5++BGou FkbAv9U8SRKfbO7Svg7GaN59jNgAJcGx8B7/LUlL/fulgtz0kCVi1fqtzyjhmWbXSNfJuwzxE3Ne1 NhTjMHFSH/Y6N39vzpmYyg==; Received: from [87.69.77.57] (port=3230 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 1oNvlE-0000aZ-K5; Tue, 16 Aug 2022 08:33:32 -0400 Date: Tue, 16 Aug 2022 15:33:20 +0300 Message-Id: <83tu6cfjvz.fsf@gnu.org> From: Eli Zaretskii To: Ihor Radchenko In-Reply-To: <87v8qs34tx.fsf@localhost> (message from Ihor Radchenko on Tue, 16 Aug 2022 17:39:22 +0800) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <87tu6d4txk.fsf@localhost> <835yitiucj.fsf@gnu.org> <871qthsiio.fsf@localhost> <83tu6dh97n.fsf@gnu.org> <83mtc5h1tg.fsf@gnu.org> <87v8qs34tx.fsf@localhost> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: gregory@heytings.org, 57207@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Ihor Radchenko > Cc: gregory@heytings.org, 57207@debbugs.gnu.org > Date: Tue, 16 Aug 2022 17:39:22 +0800 > > Eli Zaretskii writes: > > > Does the patch below fix the issue? > > Nope, unfortunately. OK, thanks. The change is correct nonetheless, so I installed it. Gregory, perhaps we should restrict the search even further, as this loop could take some tangible time with very large files. How about if we search from window-start point instead of BEGV, and limit the search by, say, 10,000,000 newlines and 200,000,000 characters, whichever happens first? Is it really likely to have files with so many short lines, followed by long lines? From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 16 08:40:05 2022 Received: (at 57207) by debbugs.gnu.org; 16 Aug 2022 12:40:05 +0000 Received: from localhost ([127.0.0.1]:45206 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNvrY-0008Oy-Lq for submit@debbugs.gnu.org; Tue, 16 Aug 2022 08:40:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42196) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNvrX-0008Ny-0L for 57207@debbugs.gnu.org; Tue, 16 Aug 2022 08:40:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38936) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNvrP-0003eq-T9; Tue, 16 Aug 2022 08:39:57 -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=Pm+c7nsB3Z7R9mvuh7NX+4SmmSePwfjuoAIeYVWzCzU=; b=Huvlxyzw838n BhIEgxZi/d8NHK4xdMGm+RgTAkzzR+2Vp2kKovXDAYvKnaJTFEwL4L7Laq/u3jVfz7foAtT2casBk GgC4SMaLMZxpiMCBjsOyE+XifRNfWqqtBTKOq3/bUA8FU8ZT5GdLn2LdsDGkAhsEfuQhZoDMj8OPk 3xVC6ZSZ9bYc6ul8pl4I5/qwdNKXC+s2Y2u/gxko8eQUMPbEuCe5TtaLTcFPm7FXjGinUk1oMd53N lGLaS3QMjAFsEdmV3In64Tisq99SKrct/ctMsz+hwbze5YrgwNUD6MBMQI4M4gmkxTr2pgxnlp2yT FAyxe9t6ypxQEA7RTG1UZw==; Received: from [87.69.77.57] (port=3644 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 1oNvrO-0005Ec-U7; Tue, 16 Aug 2022 08:39:55 -0400 Date: Tue, 16 Aug 2022 15:39:43 +0300 Message-Id: <83pmh0fjlc.fsf@gnu.org> From: Eli Zaretskii To: Ihor Radchenko In-Reply-To: <87wnb81izs.fsf@localhost> (message from Ihor Radchenko on Tue, 16 Aug 2022 20:16:23 +0800) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <83bksmka08.fsf@gnu.org> <325f95fd2b7c0cc80613@heytings.org> <83y1voflmb.fsf@gnu.org> <87wnb81izs.fsf@localhost> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: gregory@heytings.org, 57207@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Ihor Radchenko > Cc: Gregory Heytings , 57207@debbugs.gnu.org > Date: Tue, 16 Aug 2022 20:16:23 +0800 > > Throughout my today's attempts to reproduce, I did not see any obvious > difference in the slowdown between 10000 and 100000 long-line-threshold > values. OK, but the slowdown is still pretty much evident, is that right? Can you quantify it? That is, what is the time it takes you to visit the file, with long-line-threshold set to nil and with it set to its default value? Can you time this with the 'time' utility or with something similar? From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 16 08:43:07 2022 Received: (at 57207) by debbugs.gnu.org; 16 Aug 2022 12:43:07 +0000 Received: from localhost ([127.0.0.1]:45214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNvuV-0008UW-Hm for submit@debbugs.gnu.org; Tue, 16 Aug 2022 08:43:07 -0400 Received: from heytings.org ([95.142.160.155]:55770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNvuU-0008UP-8k for 57207@debbugs.gnu.org; Tue, 16 Aug 2022 08:43:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1660653785; bh=TrqeyKrmo5cPcbKDbr/BfwmLlZwY2oU33LE7NLjqZ+I=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=3eH8ZF5IKl3Y23TDNiJiETU6VopQ0ZnBgQgg03+P4OJ4zBwcqbbcd7tgwIpRHSyfh kHsgLNL1NsgjZtCopB65ISNYymSYbS+/9EBEI3D+Pz+Q8cmGBAkBpYciCvxyE3MqSr JE8iUn88r5mGtU+acn6CPMByV3XxiRIevC3/DjwaDoHw2/ont60UZyggzfiPnwKGHR dA2NPdmIZD92vY6AptoIYgS/TvVzHMo+XP8bUirlPqfc1M7+ZERjYGuRDSdOK1FOhw Qcmf4y/FV8ITKnfsv8uY7ZWwljDfop/hsO941BEOdxHpdvx57yiwP6UkzDR2I59jtd +0qT/wxV1eq4Q== Date: Tue, 16 Aug 2022 12:43:05 +0000 From: Gregory Heytings To: Ihor Radchenko Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <87r11g1ieu.fsf@localhost> Message-ID: <325f95fd2b82a19f6838@heytings.org> References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <83bksmka08.fsf@gnu.org> <325f95fd2b7c0cc80613@heytings.org> <83y1voflmb.fsf@gnu.org> <325f95fd2bce114fd74d@heytings.org> <87r11g1ieu.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 57207 Cc: Eli Zaretskii , 57207@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>> Maybe Org does something that frequently causes a window's redisplay >>> cycle to end prematurely, in which case the code that looks for long >>> lines could be called too frequently. But in that case, your proposed >>> change will have the same problem, I think? >> >> That's possible indeed, let's see what Ihor tells us. > > I'm afraid that my knowledge of Emacs redisplay is not sufficient to > give any insight. I have no clue what "redisplay cycle end prematurely" > means and how it can be triggered. > I meant: let's see whether the patch I sent upthread solves your problem. Can you please try it? From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 16 08:43:51 2022 Received: (at 57207) by debbugs.gnu.org; 16 Aug 2022 12:43:51 +0000 Received: from localhost ([127.0.0.1]:45218 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNvvC-0008VT-SF for submit@debbugs.gnu.org; Tue, 16 Aug 2022 08:43:51 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42906) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNvvA-0008VG-Kz for 57207@debbugs.gnu.org; Tue, 16 Aug 2022 08:43:48 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47394) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNvv5-0004GO-Ci; Tue, 16 Aug 2022 08:43:43 -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=EJQ6FVYPgEGlzV55KsJLPEAvNsTXRhTEREZwfb7lYsA=; b=S0MyAsbsV8fm MYFLwUKYD/WyrjmjnTpUWf0rVqYanO3fAwN3t8T7b30etnLy24XjDtG2EXZTuHqd9+qu9Tm98bvLw 3SOefEBQVZgj5+CUntxyb+DVS/UfI9EHFkEnY47Uig4jY6V8L+jt5a2lVpxcuxP/Oi710e5rmQWDu +2Q9xave8//ZqC6XBfcub7itA1nnicFw24i4MrUeR1YP7+yVJXZXhpPq5KgcVnQm3FbMXfAaBtvAn VQNTgek1SygOMHtTRdiPLm3jia6vkXNS3fw0rNZpTM66cwTZVzIL4LTcNU7zxCafWWGTq/wDAADIx 5q6UY1bxtC8GUII5eJKt8Q==; Received: from [87.69.77.57] (port=3873 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 1oNvv4-0005eT-Qr; Tue, 16 Aug 2022 08:43:43 -0400 Date: Tue, 16 Aug 2022 15:43:31 +0300 Message-Id: <83o7wkfjf0.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings In-Reply-To: <325f95fd2bce114fd74d@heytings.org> (message from Gregory Heytings on Tue, 16 Aug 2022 12:17:10 +0000) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <83bksmka08.fsf@gnu.org> <325f95fd2b7c0cc80613@heytings.org> <83y1voflmb.fsf@gnu.org> <325f95fd2bce114fd74d@heytings.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Tue, 16 Aug 2022 12:17:10 +0000 > From: Gregory Heytings > cc: 57207@debbugs.gnu.org, yantar92@gmail.com > > > We update UNCHANGED_MODIFIED in mark_window_display_accurate_1, so if > > the window completes its redisplay cycle "normally", whatever jit-lock > > does shouldn't matter for the next redisplay cycle, because > > UNCHANGED_MODIFIED will be updated from MODIFF. > > Hmmm... The fact is that using CHARS_MODIFF avoids rescanning the buffer > when "too many" text properties are changed. With xdisp.c, the long lines > detection code is not called anymore when scrolling through the (initially > unfontified) buffer. The original bug description (additional delays > between redisplay cycles in a large buffer) is probably caused by > needlessly executing that long lines detection code, at least that's > consistent with my earlier experiments. That was also my guess. (I do see the long-line detection code sometimes called while scrolling through xdisp.c, but that's probably because my Emacs is unoptimized, and so cannot keep up with the auto-repeat rate of my keyboard when I lean on C-v; and so some redisplay cycles are interrupted prematurely and don't get to mark_window_display_accurate_1.) > > What I don't understand is why enlarging the value of the threshold > > causes Emacs to "hang". If it really is some kind of infloop, I cannot > > understand how issues like outdated UNCHANGED_MODIFIED could cause that > > only for some value of the threshold, but not for a smaller value. I > > thought perhaps there are lines longer than 10000 characters, but none > > beyond 100000, but this turns out to be false, so with both values of > > the threshold that loop in redisplay_window should have scanned the > > entire buffer top to bottom in both cases... > > > > So I suspect something else is at work here. > > > > Yes, I suspect that this is another bug, separate from the original bug > Ihor described. It might be a bug in find_newline1, in the backtrace he > sent, find_newline1 returns 10568710 and later 9679581. It's not clear > however if that's in the same loop (he asked gdb to "continue" between the > two). This part of my confusion is now off the table. So the primary suspect is something that causes UNCHANGED_MODIFIED fail to be updated. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 16 08:44:14 2022 Received: (at 57207) by debbugs.gnu.org; 16 Aug 2022 12:44:14 +0000 Received: from localhost ([127.0.0.1]:45223 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNvva-000056-7y for submit@debbugs.gnu.org; Tue, 16 Aug 2022 08:44:14 -0400 Received: from heytings.org ([95.142.160.155]:55784) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNvvY-00004x-4V for 57207@debbugs.gnu.org; Tue, 16 Aug 2022 08:44:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1660653851; bh=zTmZlO3x7pj62vvFa8e3aar9VZ8453ZscSqmB3RJm1U=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=dgJgClA2XkNV9o8rxyIrUA/4Lhl0Qd/kBf0pBvlrbN3h6jFmOV44fXH0NOLQehQSo 9mLHDjHgrt0ANmULDsWxCcV4iV4W/VGiBH8l1tSSJW+rohwam/7h7A94i17RcLNlJx 221JPYB7jnNZFiK84BCyoqJ+decIUiPzkMJEJmrry2LFaOgODTt8hIZHExt7J5ip+q 5uqRvUFqLNCpsQCYsXv2Nblhy+TUCigp4dbZ1cvc+hVY4mp/JVdAnLqRz8R7ieU0xs zOBvtd8dXkeeQxPbw7NQELUYVGMr8zgODibS3PSQ5xnLY5EtLCY8vVXrsSQ0nDH2SP CwdCTER3d1SZw== Date: Tue, 16 Aug 2022 12:44:11 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <83tu6cfjvz.fsf@gnu.org> Message-ID: <325f95fd2bc6aa9295b8@heytings.org> References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <87tu6d4txk.fsf@localhost> <835yitiucj.fsf@gnu.org> <871qthsiio.fsf@localhost> <83tu6dh97n.fsf@gnu.org> <83mtc5h1tg.fsf@gnu.org> <87v8qs34tx.fsf@localhost> <83tu6cfjvz.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, Ihor Radchenko X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > > Gregory, perhaps we should restrict the search even further, as this > loop could take some tangible time with very large files. How about if > we search from window-start point instead of BEGV, and limit the search > by, say, 10,000,000 newlines and 200,000,000 characters, whichever > happens first? Is it really likely to have files with so many short > lines, followed by long lines? > Yes, that will be part of the next iteration of the code. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 16 08:50:44 2022 Received: (at 57207) by debbugs.gnu.org; 16 Aug 2022 12:50:44 +0000 Received: from localhost ([127.0.0.1]:45237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNw1r-0000GL-Ok for submit@debbugs.gnu.org; Tue, 16 Aug 2022 08:50:44 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNw1p-0000G6-Cr for 57207@debbugs.gnu.org; Tue, 16 Aug 2022 08:50:41 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40336) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNw1j-0005RL-5j; Tue, 16 Aug 2022 08:50:35 -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=3zOafsJ5XoJAvFuJpOUMo4TzBjKh34HTchqOc7GiV1I=; b=HsNCMeQbg51+ QNnZ1V7rgFzML6s5rncvL4vx9tTerY6K3EYjUtduSF2or+DAQaW/OpiIeRHNJkqdxUwDAQnlTTjUg 5KCi7nPF4dWHXOsPkwbEiNV6eTcBplzhUS/oDG9l+KypqH+xzI228Jnsldx23/cQXfbfa2VmUN4iV Fgl6C2MRQQawdxIkz5hanS8it58OaCXgsKJtHFZZUERyT/DSHtMAOun8I7cPkOr1Ls5wdb5OV9jyI RkmmjvQLILT2JOgiDrXFxiBFP/Pt3giozN3dZLb/3lbiEOObfI1T2BKMVaY2v/EbjsjhZn4ix751M tRyF7lgIbZwTzcqo9QyZ+A==; Received: from [87.69.77.57] (port=4291 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 1oNw1i-0006PX-Ll; Tue, 16 Aug 2022 08:50:34 -0400 Date: Tue, 16 Aug 2022 15:50:23 +0300 Message-Id: <83lerofj3k.fsf@gnu.org> From: Eli Zaretskii To: Ihor Radchenko In-Reply-To: <87r11g1ieu.fsf@localhost> (message from Ihor Radchenko on Tue, 16 Aug 2022 20:28:57 +0800) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <83bksmka08.fsf@gnu.org> <325f95fd2b7c0cc80613@heytings.org> <83y1voflmb.fsf@gnu.org> <325f95fd2bce114fd74d@heytings.org> <87r11g1ieu.fsf@localhost> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: gregory@heytings.org, 57207@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Ihor Radchenko > Cc: Eli Zaretskii , 57207@debbugs.gnu.org > Date: Tue, 16 Aug 2022 20:28:57 +0800 > > Gregory Heytings writes: > > >> Maybe Org does something that frequently causes a window's redisplay > >> cycle to end prematurely, in which case the code that looks for long > >> lines could be called too frequently. But in that case, your proposed > >> change will have the same problem, I think? > >> > > > > That's possible indeed, let's see what Ihor tells us. > > I'm afraid that my knowledge of Emacs redisplay is not sufficient to give > any insight. I have no clue what "redisplay cycle end prematurely" means > and how it can be triggered. It means some hook arranged in that buffer changed something very basic while the display engine was processing the window: resized windows, scrolled the text, moved overlays, modified the values that affect the mode line's dimensions. Or maybe some input that affects the display arrives too frequently for Emacs to keep up with the changes on the screen. In any such situation, redisplay cycle is forced to end prematurely, and another cycle is started almost immediately. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 17 06:42:34 2022 Received: (at 57207) by debbugs.gnu.org; 17 Aug 2022 10:42:35 +0000 Received: from localhost ([127.0.0.1]:49505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOGVO-0007ov-IQ for submit@debbugs.gnu.org; Wed, 17 Aug 2022 06:42:34 -0400 Received: from quimby.gnus.org ([95.216.78.240]:44132) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOGVN-0007of-3d for 57207@debbugs.gnu.org; Wed, 17 Aug 2022 06:42:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=3HWUWNRNIBsQXisBJeyn4wuZ9USdKsxacSgd7bM/4go=; b=C3FpGGMIftm7xDCpZerQm0aYpb I7N62QjU4gqQdfOAspReIl7pFsx5VujOTPouo5HbtBIBZN+W8VYzJdqlcX4U42CT6fj06q20is4tu 7FxlDvwocTZPM7fCwWlaSeOPWbR1yBaYnDYxUejAQYSkW6Vq2bZyQuj5k+sg5N5fwPDE=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oOGVF-00085R-3A; Wed, 17 Aug 2022 12:42:27 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <8335dxiu6m.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 15 Aug 2022 15:10:25 +0300") References: <87bksmx1j1.fsf@localhost> <83lerqkd2u.fsf@gnu.org> <87o7wl4tsv.fsf@localhost> <87r11h90zw.fsf@gnus.org> <8335dxiu6m.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAJFBMVEX3vR78xBz8xiPw vCPOoybDojcoU6F+g3CckVpWa4RjcXr///9rP2zAAAAAAWJLR0QLH9fEwAAAAAd0SU1FB+YIEQof H5nZr7kAAAGKSURBVDjLbZM9TgNBDIVnkgtgL0ghnU2TNlmgD1oOgOAKEVyDgoiUKZBouSn2en48 A5Miib/187PHGyLMh+wLUH8iMwcLYwYaJi5A/gjUEPAcFoCYckRFgiksIDLa8yxPuxM0XaUEENcE Dgt5Um2glGVAdFJMxLfTNO0nPY+7AkDAMC7H3RjHm3GZMyQBiFUhlamAwcL6wQaQZc1p4FyJGwVI qoPerojLqGpWBVZB+nHNJwAwPMus+KWCOFcHuHyV4awOTec29eMTwf17nyFjWb3x3Rc2QO9SbG0+ PomclIxK7wjp9LCpSuIKrAe+OiB+O6mt+kdpY3VmOv2pIbbWAo7MvV2C6zPAcedqaHe6KTPY+gyw BerBAtMKGsA83xChAWXAFawNIHlAFZTdpRbU3Q1F6sdcgQeagSI6aKs8L5HUkG3nnGYr1rrKINkS KX1hCkh76WvkDF+c3Fub9zeEiE0NMgPcxYsz72pr1YurmIpf7Ns+QqfDabX6BuuLk5Wayq6Pf0A/ rHQjv8c1hIV9NDCUAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIyLTA4LTE3VDEwOjMxOjMxKzAwOjAw kuVh3wAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0wOC0xN1QxMDozMTozMSswMDowMOO42WMAAAAA SUVORK5CYII= X-Now-Playing: King Crimson's _Three of a Perfect Pair_: "Industry" Date: Wed, 17 Aug 2022 12:42:24 +0200 Message-ID: <87y1vnjgmn.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: >> 1) In an HTML buffer with huge JPEGs hidden >> under display properties (we're talking multi-megabyte lines -- but >> hidden), I've seen some odd point movements around [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> 1) In an HTML buffer with huge JPEGs hidden >> under display properties (we're talking multi-megabyte lines -- but >> hidden), I've seen some odd point movements around these images -- like >> the cursor gets stuck at the edges of that line. But only sometimes. > > Can you show an example of such a file, or tell where can one download > it? Sorry, no -- like I said, I can't reproduce it reliably. >> 2) My *Messages* buffer frequently ends up being narrowed, and that >> didn't happen before. Is that something that can happen somehow? > > If it does, it could be that we don't undo the narrowing in some > situations? It sounds like it, but is that even possible? This could be something totally unrelated. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 17 08:10:30 2022 Received: (at 57207) by debbugs.gnu.org; 17 Aug 2022 12:10:30 +0000 Received: from localhost ([127.0.0.1]:49692 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOHsU-0008DY-0k for submit@debbugs.gnu.org; Wed, 17 Aug 2022 08:10:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58686) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOHsS-0008DD-2U for 57207@debbugs.gnu.org; Wed, 17 Aug 2022 08:10:28 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40220) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOHsM-0001n6-Ry; Wed, 17 Aug 2022 08:10:22 -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=hEeBrmkSSYvkevb8eUsdx71BCRtcJ9MxnpVeG++V/ac=; b=JDVdgXoz6xMu jz0K7sGdzEj7cTxo+reMgPpPVmFKKQsaCPkI2CDJACDkhqVdbSHsLTOMDk9IjPVhzpzeJs5XA4+xx kJbL7uXpqqOk826LCseyg/3jj0zEzAZWiVtMegDQHlP6xaV5iro6rUPYcEy1+KqvIpYGAWC9X1Pyq wmZQKH0NGxhMtL8BLI23nF7/VFNDZclMh1HIagU0BEBp1vMenbypqwcdiuKcbCwLJUWSuNTZViaWB K+XrCobX4B6ObfC7BCJwdeXPdeUirb6Asxum3sJDuO/jqOBBKlVKVVFqxXCA7gLBYHJq4f4/J6oss FcbriotgXepYKsz99Tf+uQ==; Received: from [87.69.77.57] (port=2176 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 1oOHsJ-0001gS-5C; Wed, 17 Aug 2022 08:10:22 -0400 Date: Wed, 17 Aug 2022 15:10:10 +0300 Message-Id: <83y1vncbq5.fsf@gnu.org> From: Eli Zaretskii To: Lars Ingebrigtsen In-Reply-To: <87y1vnjgmn.fsf@gnus.org> (message from Lars Ingebrigtsen on Wed, 17 Aug 2022 12:42:24 +0200) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <83lerqkd2u.fsf@gnu.org> <87o7wl4tsv.fsf@localhost> <87r11h90zw.fsf@gnus.org> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: yantar92@gmail.com, 57207@debbugs.gnu.org > Date: Wed, 17 Aug 2022 12:42:24 +0200 > > Eli Zaretskii writes: > > >> 1) In an HTML buffer with huge JPEGs hidden > >> under display properties (we're talking multi-megabyte lines -- but > >> hidden), I've seen some odd point movements around these images -- like > >> the cursor gets stuck at the edges of that line. But only sometimes. > > > > Can you show an example of such a file, or tell where can one download > > it? > > Sorry, no -- like I said, I can't reproduce it reliably. Well, next time it happens, would you please note the file/URL and post it? > >> 2) My *Messages* buffer frequently ends up being narrowed, and that > >> didn't happen before. Is that something that can happen somehow? > > > > If it does, it could be that we don't undo the narrowing in some > > situations? > > It sounds like it, but is that even possible? Bugs are strange things, yes. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 17 08:36:53 2022 Received: (at 57207) by debbugs.gnu.org; 17 Aug 2022 12:36:53 +0000 Received: from localhost ([127.0.0.1]:49739 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOII0-0000Rs-PO for submit@debbugs.gnu.org; Wed, 17 Aug 2022 08:36:53 -0400 Received: from quimby.gnus.org ([95.216.78.240]:45354) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOIHy-0000Re-SD for 57207@debbugs.gnu.org; Wed, 17 Aug 2022 08:36:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=kW+oO4sGDnl0Cm3K1UXpS/k20FOBt7poz8p7TaIPhcg=; b=a19n1wHBy8l3Pf3RbWIs44WkGF 3rm0GO/GwW4B3AwS0v83Fn2zga/zFrJb2ivlQFHRl32LHDyJgZbdpu1rG7E/SgKw8DK+BY44FZAlT UncVkuawMOAS1qjukInvJzR7IaNGSCoNBMqkI9yhVenWMY5y319gEKTOcSDiYJ/0+Y3w=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oOIHp-0000jP-Gn; Wed, 17 Aug 2022 14:36:43 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <83y1vncbq5.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 17 Aug 2022 15:10:10 +0300") References: <87bksmx1j1.fsf@localhost> <83lerqkd2u.fsf@gnu.org> <87o7wl4tsv.fsf@localhost> <87r11h90zw.fsf@gnus.org> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAD1BMVEWaf2q3opj57Odp WVb///8NpW1pAAAAAWJLR0QEj2jZUQAAAAd0SU1FB+YIEQwhFTxEIWgAAAG8SURBVDjLbZLbte0g CEVh0wBoAydWQIb993bXImrycc2IMU7eICLiIopHPFRiL/ksD9EvqC9u1OOzANp1NTwUby4mfgCu x7givDbxskfPtXAGHpQoTwDRIigbYyxCY5JCO2OEtwXG4yMlKN3i3Jd2yGQCWobiqyIdORM0COoG SvAkC0M9ZQOhqWNbVKHF0x+LN/X4xOv6H8DV7wNSjzwT6q2AQeMuJy7jTyuHA7Kismx/+tueCqx1 j6utDC8poLbAWxKRiTySTTfwEx46kQ/AsrD5O8DuKiKagq6E5y4BXNQwsFlodevtdRHMkWyyjgXi EksC1h79+nQpTUvD0ZCZu8iQmyXs7qoM94Br1pRIoH8Am3DoRmkEJyuRO7t7XRjMH9Wk7q1KxkFz +XGWcs+hrVKiPFntzxqfF2Q4K9OZWeYLUgHgSjriSdhb8iYBK3xZWmo8CjjEZdgmJKEx83hGWDQ8 JQ2RbscVbi/An5wLPWNh0MevZ9EdU4FZHh6wnLA8bgQ25aNh0+7enwsOAxSM2tjxdt0RHkP2ZGKP 7fyA9Nep8WvzhnHWA7G+dS6AObw7zeQu2zrY8t/PjOs/zc10X4zqlNwAAAAldEVYdGRhdGU6Y3Jl YXRlADIwMjItMDgtMTdUMTI6MzM6MjErMDA6MDA65gQ3AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIy LTA4LTE3VDEyOjMzOjIxKzAwOjAwS7u8iwAAAABJRU5ErkJggg== X-Now-Playing: David Bowie's _Hunky Dory_: "Changes" Date: Wed, 17 Aug 2022 14:36:34 +0200 Message-ID: <87r11fgi7h.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > Well, next time it happens, would you please note the file/URL and > post it? It's not that simple, but I think I have may have a recipe now. But one question first: Is (setq long-line-threshold nil) supposed to disable these optimisations totally, or are there other things als [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: > Well, next time it happens, would you please note the file/URL and > post it? It's not that simple, but I think I have may have a recipe now. But one question first: Is (setq long-line-threshold nil) supposed to disable these optimisations totally, or are there other things also in the mix now? Because I'm seeing these oddnesses even if I do that. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 17 09:27:23 2022 Received: (at 57207) by debbugs.gnu.org; 17 Aug 2022 13:27:23 +0000 Received: from localhost ([127.0.0.1]:49826 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOJ4s-0001mQ-S4 for submit@debbugs.gnu.org; Wed, 17 Aug 2022 09:27:23 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOJ4r-0001mD-Fb for 57207@debbugs.gnu.org; Wed, 17 Aug 2022 09:27:22 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58846) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOJ4l-00077x-Nw; Wed, 17 Aug 2022 09:27:16 -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=sdTQ76uANNHA75BKYNX9iKeF2aVwiFcPEhgNBR33RHc=; b=KP6szDkXiRn0 bqLeOjfSUKi5N8oafmzLVrk3u6zeejdj15thlGp74P2R7tc9AoD4sc+zhEeXwMpbPMlceaqjdPVTz a/Aw1oLXwboR5qE1zWDxXP7eUBg/1NurrtNtRctFMP7VgQqUIElKg9V9GzJsGkvwwjwA5AWs2ZNkc RuuanVeEQzWF+sgkrC7NMM/lx8yODWT3KQA9Ap5amJQpNsVR3IsgFpr9tRN/uhajbZ4K0oA3nMteI iCBh/YPiV6gPc2r8pzChuUw1NXsVXcZ0fvDpN1E1sXq3REuUR/6sMWnxmPadpwEYnQldnylCrF7Cq 4UDexOkzUya0zuQG9U1vJQ==; Received: from [87.69.77.57] (port=3134 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 1oOJ4l-0002T6-6e; Wed, 17 Aug 2022 09:27:15 -0400 Date: Wed, 17 Aug 2022 16:27:05 +0300 Message-Id: <83sflvc85y.fsf@gnu.org> From: Eli Zaretskii To: Lars Ingebrigtsen In-Reply-To: <87r11fgi7h.fsf@gnus.org> (message from Lars Ingebrigtsen on Wed, 17 Aug 2022 14:36:34 +0200) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <83lerqkd2u.fsf@gnu.org> <87o7wl4tsv.fsf@localhost> <87r11h90zw.fsf@gnus.org> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: yantar92@gmail.com, 57207@debbugs.gnu.org > Date: Wed, 17 Aug 2022 14:36:34 +0200 > > Is (setq long-line-threshold nil) supposed to disable these > optimisations totally Yes. At least that was the intent. If long-line-threshold is nil, everything should work as it did before. The only unrelated change is the syntax-wholelines-max variable and what depends on it. AFAIK. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 18 09:02:28 2022 Received: (at 57207) by debbugs.gnu.org; 18 Aug 2022 13:02:28 +0000 Received: from localhost ([127.0.0.1]:54202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOfAJ-0001Oe-Ty for submit@debbugs.gnu.org; Thu, 18 Aug 2022 09:02:28 -0400 Received: from quimby.gnus.org ([95.216.78.240]:56568) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOfAH-0001ON-Vn for 57207@debbugs.gnu.org; Thu, 18 Aug 2022 09:02:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Dgra6DdnMdmKcb76U/Mag8D2hBmiERQGDltehTFjFQU=; b=shkwChaed2oPH8xTrg8YZYuywL C2qlr4si892VoUAMDxPyDphEJCNpHXBxClSfqMEQmDGhKiejvzDlUma2qhyY5gPP4/WilqABsaU9/ cq7DvbGJO58mWFeXdNznx2UZ1zCdisQaEcuPpg3CDFBgmKHrdmdCUjb1PiR3AKIdwCNM=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oOfA8-0007Zp-Lh; Thu, 18 Aug 2022 15:02:19 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <83sflvc85y.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 17 Aug 2022 16:27:05 +0300") References: <87bksmx1j1.fsf@localhost> <83lerqkd2u.fsf@gnu.org> <87o7wl4tsv.fsf@localhost> <87r11h90zw.fsf@gnus.org> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> X-Now-Playing: Aoki Tomonori + Mochizuki Harutaka + Kawabata Makoto - Pink Lady Lemonade's _Being for the Benefit of =?utf-8?Q?Kaf=C3=A9_H=C3=A6rver?= =?utf-8?Q?k!=5F=3A?= "Chaotic Dark Splash" Date: Thu, 18 Aug 2022 15:02:15 +0200 Message-ID: <87h729902w.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: I still don't have a recipe to reproduce this. If I do the following in this running Emacs: C-x C-f /tmp/empty-file.txt M-: (insert (propertize (make-string 20000 ?x) 'display "foo")) Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) I still don't have a recipe to reproduce this. If I do the following in this running Emacs: C-x C-f /tmp/empty-file.txt M-: (insert (propertize (make-string 20000 ?x) 'display "foo")) Then hit RET a couple of times, and then type any key (like `d'), the mode line starts saying "Narrow". If I hit it again, it switches off, and then hitting it again switches it on again. But if I try to reproduce this from -Q, or even with my .emacs, it doesn't happen. So something has to be present... in some other buffer...? for this to start happening, and I don't know what. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 18 09:23:18 2022 Received: (at 57207) by debbugs.gnu.org; 18 Aug 2022 13:23:18 +0000 Received: from localhost ([127.0.0.1]:54247 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOfUT-00046k-T8 for submit@debbugs.gnu.org; Thu, 18 Aug 2022 09:23:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40514) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOfUQ-00046W-A3 for 57207@debbugs.gnu.org; Thu, 18 Aug 2022 09:23:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46674) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOfUK-0002ZN-TB; Thu, 18 Aug 2022 09:23:08 -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=lvbDn9Z0xTj8voCYDhgJuufZ0/wnxX73ujqbKhAJpvU=; b=IZURIxFFU66Z rcbO64ZdYyoO8DSxeb86vkKDkprq/oL9joZvkcVk/BiDq0eowRBNtQUynaQDUUYFUP2rqnGMz91WA KKd1efvtXOPh5s960HALgG3zMfveLM61wGkjs+QAFgKZFm9rf3QReEhD/qOBEkUzttYoNTtGopy7U VvGxA3VSzR5W2BmiNUgFPCLwB+mJ7juOabdxMZvan6R3n18QpC+EE+evmftp0qHqp4ZsDoyTzbLME IaFFGQBZ+Ox5pVkhFRgfT6CWHazmLJbfmCbbF5NwGfOpxYBeOl3LkqQygTFb88JxDPv4UJmBxG56C UeSmZs3mV8jp3C85jIn+Bg==; Received: from [87.69.77.57] (port=3238 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 1oOfUK-0000LT-CE; Thu, 18 Aug 2022 09:23:08 -0400 Date: Thu, 18 Aug 2022 16:23:01 +0300 Message-Id: <83edxdbs96.fsf@gnu.org> From: Eli Zaretskii To: Lars Ingebrigtsen In-Reply-To: <87h729902w.fsf@gnus.org> (message from Lars Ingebrigtsen on Thu, 18 Aug 2022 15:02:15 +0200) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <83lerqkd2u.fsf@gnu.org> <87o7wl4tsv.fsf@localhost> <87r11h90zw.fsf@gnus.org> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: yantar92@gmail.com, 57207@debbugs.gnu.org > Date: Thu, 18 Aug 2022 15:02:15 +0200 > > If I do the following in this running Emacs: > > C-x C-f /tmp/empty-file.txt > M-: (insert (propertize (make-string 20000 ?x) 'display "foo")) > > Then hit RET a couple of times, and then type any key (like `d'), the > mode line starts saying "Narrow". If I hit it again, it switches off, > and then hitting it again switches it on again. Can you attach a debugger to this session, and produce a C and Lisp backtrace from Fnarrow_to_region and Fwiden when you do the above? From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 18 09:33:18 2022 Received: (at 57207) by debbugs.gnu.org; 18 Aug 2022 13:33:18 +0000 Received: from localhost ([127.0.0.1]:54253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOfe9-0006UD-Sy for submit@debbugs.gnu.org; Thu, 18 Aug 2022 09:33:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54132) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOfe7-0006Tz-3a for 57207@debbugs.gnu.org; Thu, 18 Aug 2022 09:33:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42020) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOfe1-0005P7-CQ; Thu, 18 Aug 2022 09:33:09 -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=ddrQeoYGdkzebV3kCb8ZF9qQwHNkx/5HTjTyMBwbdXg=; b=DPYVO5oj4kiK Ikv9dB1cf2FQstA1Wk8orF5TVtqqcCAf/0icxJekqKfdgLVP0MYRJyLhAhw8gPAkgIT2oIFqz14Pf u7FMy841182r64c/BBM+BzFNoVnNy7vyexg2SemArNoysuh7ukxlGp2Xld/eRSumFFS4OeV9eSU6S q+C/LBIXGHzwPSrXQUQJ75eDWCevJo0oMjt34EB4AdUF0PCd20NFP/y5eNz9qkTSLgsQi7evdzK/O HP604Zo2Q5HN1EFE3XrhOQ9loI3rlT6BTifN2xLjHT+TRa23Z3dwGbTYAovAiBfWgtZWcrAkTU2BI y6tWBVjGTPLSVElIg8yhqw==; Received: from [87.69.77.57] (port=3853 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 1oOfe0-0006u6-SB; Thu, 18 Aug 2022 09:33:09 -0400 Date: Thu, 18 Aug 2022 16:33:01 +0300 Message-Id: <83czcxbrsi.fsf@gnu.org> From: Eli Zaretskii To: larsi@gnus.org In-Reply-To: <83edxdbs96.fsf@gnu.org> (message from Eli Zaretskii on Thu, 18 Aug 2022 16:23:01 +0300) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <83lerqkd2u.fsf@gnu.org> <87o7wl4tsv.fsf@localhost> <87r11h90zw.fsf@gnus.org> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 57207@debbugs.gnu.org, yantar92@gmail.com > Date: Thu, 18 Aug 2022 16:23:01 +0300 > From: Eli Zaretskii > > > From: Lars Ingebrigtsen > > Cc: yantar92@gmail.com, 57207@debbugs.gnu.org > > Date: Thu, 18 Aug 2022 15:02:15 +0200 > > > > If I do the following in this running Emacs: > > > > C-x C-f /tmp/empty-file.txt > > M-: (insert (propertize (make-string 20000 ?x) 'display "foo")) > > > > Then hit RET a couple of times, and then type any key (like `d'), the > > mode line starts saying "Narrow". If I hit it again, it switches off, > > and then hitting it again switches it on again. > > Can you attach a debugger to this session, and produce a C and Lisp > backtrace from Fnarrow_to_region and Fwiden when you do the above? Also, do you see any error messages in *Messages*? From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 18 09:50:59 2022 Received: (at 57207) by debbugs.gnu.org; 18 Aug 2022 13:50:59 +0000 Received: from localhost ([127.0.0.1]:54278 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOfvG-0006yE-Uy for submit@debbugs.gnu.org; Thu, 18 Aug 2022 09:50:59 -0400 Received: from quimby.gnus.org ([95.216.78.240]:57118) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOfvE-0006xw-3H for 57207@debbugs.gnu.org; Thu, 18 Aug 2022 09:50:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=6uh1SS7GDP4JA+CPeU16FRjhLt+wL2z+GbqVLv70kLw=; b=FjufjvmoB319lRTJjTytqrGVV8 Zyu+ifdiZqkp7/H3QnO2A1v7zrQhQIv7WpLfWUmmU9Vnkn1MCzd9HCPs1dBcRK0KUvr+WWUvfleWG vRCtPlrDc5e7hr2zVaUbi/ndGNANuVtO7T30dUEdNgZiZDXT9485+kqQp4eytv+3rJrQ=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oOfv4-00083M-5f; Thu, 18 Aug 2022 15:50:48 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <83edxdbs96.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 18 Aug 2022 16:23:01 +0300") References: <87bksmx1j1.fsf@localhost> <83lerqkd2u.fsf@gnu.org> <87o7wl4tsv.fsf@localhost> <87r11h90zw.fsf@gnus.org> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> X-Now-Playing: Sindre Bjerga's _Being for the Benefit of =?utf-8?Q?Kaf?= =?utf-8?Q?=C3=A9_H=C3=A6rverk!=5F=3A?= "1500 Seconds Over Tokyo" Date: Thu, 18 Aug 2022 15:50:45 +0200 Message-ID: <87wnb5wthm.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > Can you attach a debugger to this session, and produce a C and Lisp > backtrace from Fnarrow_to_region and Fwiden when you do the above? Setting a breakpoint on Fnarrow_to_region doesn't trigger -- the buffer flips back and forth to [Narrow] anyway. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: > Can you attach a debugger to this session, and produce a C and Lisp > backtrace from Fnarrow_to_region and Fwiden when you do the above? Setting a breakpoint on Fnarrow_to_region doesn't trigger -- the buffer flips back and forth to [Narrow] anyway. Fwiden is triggered all the time, but as far as I can see, never in a relevant code path -- but I've made some progress in determining just what triggers this behaviour: I need to have a process connection going. Without processes being forked, the flipping back and forth doesn't happen. A couple examples of the calls to Fwiden: 0x0000555555759f8c in Fwiden () at editfns.c:2672 #1 Fwiden () at editfns.c:2659 #2 0x00005555556ff1ed in Ferase_buffer () at buffer.c:2318 #3 0x0000555555655f3d in code_conversion_save (with_work_buf=with_work_buf@entry=true, multibyte=) at coding.c:7875 #4 0x0000555555656b23 in decode_coding_object (coding=coding@entry=0x5555573bedf0, src_object=src_object@entry=XIL(0), from=from@entry=0, from_byte=from_byte@entry=0, to=to@entry=57, to_byte=to_byte@entry=57, dst_object=) at coding.c:8129 #5 0x00005555557b6752 in read_and_dispose_of_process_output (coding=0x5555573bedf0, nbytes=57, chars=0x7fffffffbe90 "PING 192.168.12.94 (192.168.12.94) 56(84) bytes of data.\n", p=) at process.c:6253 #6 read_process_output (proc=proc@entry=XIL(0x5555579e538d), channel=channel@entry=17) at process.c:6205 #7 0x00005555557bde76 in wait_reading_process_output (time_limit=time_limit@entry=30, nsecs=nsecs@entry=0, read_kbd=read_kbd@entry=-1, do_display=do_display@entry=true, wait_for_cell=wait_for_cell@entry=XIL(0), wait_proc=wait_proc@entry=0x0, just_wait_proc=) at process.c:5889 #8 0x00005555555b8694 in sit_for Thread 1 "emacs" hit Breakpoint 4, Fwiden () at editfns.c:2669 2669 { (gdb) bt #0 Fwiden () at editfns.c:2669 #1 0x00005555557b160e in exec_byte_code (fun=, args_template=, nargs=, args=) at bytecode.c:1489 #2 0x0000555555768ee3 in Ffuncall (nargs=1, args=0x7ffff092e050) at eval.c:3014 #3 0x000055555576abb8 in Fapply (nargs=2, args=0x7ffff092e050) at eval.c:2638 #4 0x00005555557b0c03 in exec_byte_code (fun=, args_template=, nargs=, args=) at bytecode.c:809 #5 0x0000555555768ee3 in Ffuncall (nargs=nargs@entry=2, args=args@entry=0x7fffffffcd10) at eval.c:3014 #6 0x00005555556e2dfe in call1 (arg1=XIL(0x5555572b14f5), fn=XIL(0xf4e0)) at /home/larsi/src/emacs/trunk/src/lisp.h:3239 #7 timer_check_2 (idle_timers=, timers=) at keyboard.c:4697 #8 timer_check () at keyboard.c:4763 #9 0x00005555556e315d in readable_events (flags=flags@entry=1) at keyboard.c:3540 #10 0x00005555556e3328 in get_input_pending (flags=flags@entry=1) at keyboard.c:7338 #11 0x00005555556e33b1 in swallow_events (do_display=do_display@entry=true) at keyboard.c:4499 (gdb) xbacktrace "jit-lock-context-fontify" (0xf092e0a8) 0xf1ff0028 PVEC_COMPILED "apply" (0xf092e050) "timer-event-handler" (0xffffcd18) From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 18 09:52:02 2022 Received: (at 57207) by debbugs.gnu.org; 18 Aug 2022 13:52:02 +0000 Received: from localhost ([127.0.0.1]:54282 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOfwI-000708-Fj for submit@debbugs.gnu.org; Thu, 18 Aug 2022 09:52:02 -0400 Received: from quimby.gnus.org ([95.216.78.240]:57138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOfwG-0006ze-GN for 57207@debbugs.gnu.org; Thu, 18 Aug 2022 09:52:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=xALdtWHGnDIMJDyOwd2DyIEtH8jIMoy/7Xjtaw10+lY=; b=t9i+Z66mm/EWWjPDcAdiNuaxm2 yGtcL42oMEnj+ECNKynIE7Qppz7nsrBzvTs/7QteWRerYbx55jga1l4LpxS6VwUnhVSlFwFT8aFYu exMuxGHRtrITDQ8fhCsiVm5MJQ5n2rFehY9yuVr0rx0DL3vR3hTe6sZARO/GefKFad5U=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oOfw7-00083u-Tf; Thu, 18 Aug 2022 15:51:54 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <83czcxbrsi.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 18 Aug 2022 16:33:01 +0300") References: <87bksmx1j1.fsf@localhost> <83lerqkd2u.fsf@gnu.org> <87o7wl4tsv.fsf@localhost> <87r11h90zw.fsf@gnus.org> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <83czcxbrsi.fsf@gnu.org> X-Now-Playing: Center Of The Universe's _Being for the Benefit of =?utf-8?Q?Kaf=C3=A9_H=C3=A6rverk!=5F=3A?= "Disco Horo" Date: Thu, 18 Aug 2022 15:51:50 +0200 Message-ID: <87sfltwtft.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > Also, do you see any error messages in *Messages*? No, no error messages in *Messages*. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: > Also, do you see any error messages in *Messages*? No, no error messages in *Messages*. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 18 09:58:19 2022 Received: (at 57207) by debbugs.gnu.org; 18 Aug 2022 13:58:19 +0000 Received: from localhost ([127.0.0.1]:56359 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOg2N-0007fK-6S for submit@debbugs.gnu.org; Thu, 18 Aug 2022 09:58:19 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOg2I-0007f2-4Y for 57207@debbugs.gnu.org; Thu, 18 Aug 2022 09:58:17 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50868) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOg2C-0003Kc-RH; Thu, 18 Aug 2022 09:58:08 -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=AZZyJifZAadnesBpTl0JluO0jEhg/KV11JmaMw2ogW4=; b=kiNuVXMEceJU +LjobL5j+nhJeoySQ1cjVmvrV/ZfygLXvoxdK6/hgHLeaPBN9yRD3LqGqeqesNcmDRNIhj6pWMBDQ MEcgoi9FDszcjobvnC41+KD3t90D4zxMIjiR9+WkX/9QpALdL80zZpa2qahoal8lpOwmyxdLpy7QZ HeIk398J8PCC5xBz+dneoGDtooK/RtcclRrHk6aFB80w4Nwru95OjhSTRbwNerZwxIRMJ3LHwWhiY fWi069hrbQT13eAlOgIuf7QMoKr8vMMRULwzyBm4yKISNNgOncLlFpibSAfqNj9bHIw6Cbr5qskUJ acJcsVwZTaQlUdwTxEu/ZA==; Received: from [87.69.77.57] (port=1994 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 1oOg2C-0003P5-9g; Thu, 18 Aug 2022 09:58:08 -0400 Date: Thu, 18 Aug 2022 16:58:00 +0300 Message-Id: <83pmgxfyc7.fsf@gnu.org> From: Eli Zaretskii To: Lars Ingebrigtsen In-Reply-To: <87wnb5wthm.fsf@gnus.org> (message from Lars Ingebrigtsen on Thu, 18 Aug 2022 15:50:45 +0200) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <83lerqkd2u.fsf@gnu.org> <87o7wl4tsv.fsf@localhost> <87r11h90zw.fsf@gnus.org> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: yantar92@gmail.com, 57207@debbugs.gnu.org > Date: Thu, 18 Aug 2022 15:50:45 +0200 > > Eli Zaretskii writes: > > > Can you attach a debugger to this session, and produce a C and Lisp > > backtrace from Fnarrow_to_region and Fwiden when you do the above? > > Setting a breakpoint on Fnarrow_to_region doesn't trigger -- the buffer > flips back and forth to [Narrow] anyway. OK. Does this buffer have long lines? What does long-line-optimizations-p return? From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 18 10:01:26 2022 Received: (at 57207) by debbugs.gnu.org; 18 Aug 2022 14:01:26 +0000 Received: from localhost ([127.0.0.1]:56363 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOg5N-0007m4-Om for submit@debbugs.gnu.org; Thu, 18 Aug 2022 10:01:25 -0400 Received: from quimby.gnus.org ([95.216.78.240]:57216) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOg5L-0007lq-QM for 57207@debbugs.gnu.org; Thu, 18 Aug 2022 10:01:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=bnHunRDIo0fBXNamb97Yj756QITPstYUdbT/SM9F45E=; b=n9UVX2KeqAg8eqCqQDVqYmKjeo uxPpG6ntrJNnxRo+km2GWClOieQwFLXYPEA0tvGN1fXLHeDJsnCjUu/zyNqjyhvDjpfWcdEufcb+4 6roYD5SjoxSbAWWlv3v+wLEEkr+heNCRRTG0WDSriTIwqha41qx62T1mic50fl/Z5ZFE=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oOg5C-00089O-Qu; Thu, 18 Aug 2022 16:01:17 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <87sfltwtft.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 18 Aug 2022 15:51:50 +0200") References: <87bksmx1j1.fsf@localhost> <83lerqkd2u.fsf@gnu.org> <87o7wl4tsv.fsf@localhost> <87r11h90zw.fsf@gnus.org> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <83czcxbrsi.fsf@gnu.org> <87sfltwtft.fsf@gnus.org> X-Now-Playing: CUTCUTCUTCUTCUT's _Being for the Benefit of =?utf-8?Q?Kaf?= =?utf-8?Q?=C3=A9_H=C3=A6rverk!=5F=3A?= "Distorted Perception" Date: Thu, 18 Aug 2022 16:01:13 +0200 Message-ID: <87k075wt06.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: This reproduces for me: (progn (run-at-time 1 1 (lambda ())) (pop-to-buffer "foo.txt") (text-mode) (insert (propertize (make-string 20000 ?x) 'display "foo"))) But not in -Q; just with my normal .emacs. I'll start bisecting. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) This reproduces for me: (progn (run-at-time 1 1 (lambda ())) (pop-to-buffer "foo.txt") (text-mode) (insert (propertize (make-string 20000 ?x) 'display "foo"))) But not in -Q; just with my normal .emacs. I'll start bisecting. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 18 10:02:14 2022 Received: (at 57207) by debbugs.gnu.org; 18 Aug 2022 14:02:14 +0000 Received: from localhost ([127.0.0.1]:56367 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOg6A-0007nY-3A for submit@debbugs.gnu.org; Thu, 18 Aug 2022 10:02:14 -0400 Received: from quimby.gnus.org ([95.216.78.240]:57232) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOg68-0007nN-MY for 57207@debbugs.gnu.org; Thu, 18 Aug 2022 10:02:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=NcL6wYg5XyGRW/26aK3IXviLFMXhXeJ7exguP9u/9jc=; b=ZifXzr33kE57Ny98XXEqKNnfHd 2UpFNGC06d5nlW7wDp6s2XLBJLfojUALWJM0dJ04Zwbru+R4okvv7q4p+lF036YZi34TxMj8MaGxu Q60DkPtSX479v22ySvZ66mZ5Z1iRwkkPI2WPUfJLQmnkWPS+iQuYfu6RftBPW3UicCIc=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oOg60-00089p-FM; Thu, 18 Aug 2022 16:02:06 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <83pmgxfyc7.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 18 Aug 2022 16:58:00 +0300") References: <87bksmx1j1.fsf@localhost> <83lerqkd2u.fsf@gnu.org> <87o7wl4tsv.fsf@localhost> <87r11h90zw.fsf@gnus.org> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> X-Now-Playing: CUTCUTCUTCUTCUT's _Being for the Benefit of =?utf-8?Q?Kaf?= =?utf-8?Q?=C3=A9_H=C3=A6rverk!=5F=3A?= "Distorted Perception" Date: Thu, 18 Aug 2022 16:02:03 +0200 Message-ID: <87fshtwsys.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > OK. Does this buffer have long lines? What does > long-line-optimizations-p return? Yes, and t. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: > OK. Does this buffer have long lines? What does > long-line-optimizations-p return? Yes, and t. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 18 10:11:06 2022 Received: (at 57207) by debbugs.gnu.org; 18 Aug 2022 14:11:06 +0000 Received: from localhost ([127.0.0.1]:56387 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOgEk-00081O-Ea for submit@debbugs.gnu.org; Thu, 18 Aug 2022 10:11:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49126) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOgEi-00080v-R3 for 57207@debbugs.gnu.org; Thu, 18 Aug 2022 10:11:05 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44840) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOgEd-0007JO-JD; Thu, 18 Aug 2022 10:10:59 -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=2/QD77CnSWKjbFcHBSvfwXHEd8HOv+1cHyHDUO1nFCc=; b=dMRNYHN/ePpA U+OmrQ9nAbJLC7cG0bdfCw8QkmOShxEJb8WR/RdjGwp933o2HJLLsxWPPJfw3ziGGzAo36oV7UxmQ AOoGBW0gadfMOVCeWhoeoZ3ChGrcBTNzhvB+V5Dht2DFQzZlvDj4ap20htu3pMs1vfw7+OmlWVl8v hDGmkwwF9R9scVnuoBtfKvtJ4mDMWmE4celK9of3t4euNZzIFg5P93KHIWl/Eod1dhekI7YfvxASe GmgAxbpsomm8wG4WOhqsr0SILOUxslYJGuxLZjU1ldoQ2PXC9EoT7Mc3dJCvS1J+/IuxHiMPbaqzF hrTj0NXU0FtbdBoz4AQ90A==; Received: from [87.69.77.57] (port=2781 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 1oOgEd-0008PM-1V; Thu, 18 Aug 2022 10:10:59 -0400 Date: Thu, 18 Aug 2022 17:10:51 +0300 Message-Id: <83mtc1fxqs.fsf@gnu.org> From: Eli Zaretskii To: Lars Ingebrigtsen In-Reply-To: <87k075wt06.fsf@gnus.org> (message from Lars Ingebrigtsen on Thu, 18 Aug 2022 16:01:13 +0200) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <83lerqkd2u.fsf@gnu.org> <87o7wl4tsv.fsf@localhost> <87r11h90zw.fsf@gnus.org> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <83czcxbrsi.fsf@gnu.org> <87sfltwtft.fsf@gnus.org> <87k075wt06.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: 57207@debbugs.gnu.org, yantar92@gmail.com > Date: Thu, 18 Aug 2022 16:01:13 +0200 > > This reproduces for me: > > (progn > (run-at-time 1 1 (lambda ())) > (pop-to-buffer "foo.txt") > (text-mode) > (insert (propertize (make-string 20000 ?x) 'display "foo"))) > > But not in -Q; just with my normal .emacs. I'll start bisecting. I don't see "Narrow" in the modeline after the above. But a momentary narrowing does happen, and it comes from here: safe_run_hooks_maybe_narrowed (Qpre_command_hook, XWINDOW (selected_window)); [...] safe_run_hooks_maybe_narrowed (Qpost_command_hook, XWINDOW (selected_window)); The function on pre-command-hook in my case is tooltip-hide. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 18 10:13:36 2022 Received: (at 57207) by debbugs.gnu.org; 18 Aug 2022 14:13:36 +0000 Received: from localhost ([127.0.0.1]:56394 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOgH9-00084u-VY for submit@debbugs.gnu.org; Thu, 18 Aug 2022 10:13:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35114) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOgH8-00084i-9D for 57207@debbugs.gnu.org; Thu, 18 Aug 2022 10:13:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38634) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOgH3-0007Yf-2f; Thu, 18 Aug 2022 10:13:29 -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=tniZjdhggrhrVEmG1QCEHftnBZNXQLzHm6suIKcjr0I=; b=ZYrRnHY+MABz Z2FPZFar+pqv/rJrzxCb7h/mwV8pD1VaLtx/AZqa8e00zZiNQ8dmw2mRhLO//R190tksTO48oRlFf jUJOOZu1UFgluzUjtXsrt2B14whKt2aVj/L2gO0E3iM845LX0do5P7h33+qDfeU1/+P0WB6m34REn gj8xv7WqkFAH+wVLpuRV2gBkJ+1LY2VaQK3ZovZksAjeuAmb+iSsPLX/Nfoez5TZFg9Gl8WbTH7GF DhOVxvr5QltuiOgWU5kRabqUjdsDas6Crf9VlwUR5zXu9VGY1l0L7Eyx038zkQkssBq7oV/X+2rs/ Oxjo9KV4mQ5Bdq3RuAM2Eg==; Received: from [87.69.77.57] (port=2937 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 1oOgH2-0000Qe-E2; Thu, 18 Aug 2022 10:13:28 -0400 Date: Thu, 18 Aug 2022 17:13:21 +0300 Message-Id: <83lerlfxmm.fsf@gnu.org> From: Eli Zaretskii To: larsi@gnus.org In-Reply-To: <83mtc1fxqs.fsf@gnu.org> (message from Eli Zaretskii on Thu, 18 Aug 2022 17:10:51 +0300) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <83lerqkd2u.fsf@gnu.org> <87o7wl4tsv.fsf@localhost> <87r11h90zw.fsf@gnus.org> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <83czcxbrsi.fsf@gnu.org> <87sfltwtft.fsf@gnus.org> <87k075wt06.fsf@gnus.org> <83mtc1fxqs.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 57207@debbugs.gnu.org, yantar92@gmail.com > Date: Thu, 18 Aug 2022 17:10:51 +0300 > From: Eli Zaretskii > > But a momentary narrowing does happen, and it comes from here: > > > safe_run_hooks_maybe_narrowed (Qpre_command_hook, > XWINDOW (selected_window)); > [...] > > safe_run_hooks_maybe_narrowed (Qpost_command_hook, > XWINDOW (selected_window)); I guess we need unwind-protect inside safe_run_hooks_maybe_narrowed? From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 18 10:14:29 2022 Received: (at 57207) by debbugs.gnu.org; 18 Aug 2022 14:14:29 +0000 Received: from localhost ([127.0.0.1]:56401 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOgI0-00086o-8c for submit@debbugs.gnu.org; Thu, 18 Aug 2022 10:14:29 -0400 Received: from quimby.gnus.org ([95.216.78.240]:57386) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOgHj-000862-8v for 57207@debbugs.gnu.org; Thu, 18 Aug 2022 10:14:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=97vtkgZ2KK7KB92nnBpF+sH6efqy+h1gL5pQKx6ZL9g=; b=Ak9HhTQ3JyB3Cc4MXhWX7Ay34M SN6xT7LhM/NKOKQR/TnpO8QSZDskRCeGLaa6osU4Sler0z7zIRaXaY06rM+/FhvT2KRiLONdaYy0g 5dz7lBBtm/MKr6V8Q8XUJOO+o93U+tpl6bhwGVFSP6siimR/pg7blymDfSscjpZoyrJo=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oOgHa-0008K6-7P; Thu, 18 Aug 2022 16:14:04 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <87fshtwsys.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 18 Aug 2022 16:02:03 +0200") References: <87bksmx1j1.fsf@localhost> <83lerqkd2u.fsf@gnu.org> <87o7wl4tsv.fsf@localhost> <87r11h90zw.fsf@gnus.org> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> X-Now-Playing: The Dead C's _Being for the Benefit of =?utf-8?Q?Kaf=C3=A9?= =?utf-8?Q?_H=C3=A6rverk!=5F=3A?= "Untitled Oslo" Date: Thu, 18 Aug 2022 16:13:59 +0200 Message-ID: <87bkshwsew.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: This reproduces for me from "emacs -Q": (progn (run-at-time 1 1 (lambda ())) (pop-to-buffer "foo.txt") (text-mode) (flyspell-mode) (insert (propertize (make-string 20000 ?x) 'display "foo") "\n\n")) If you hit "d", the mode line says "Narrow", and hitting RET will remove the narrowing, and repeating that repeats the toggle. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) This reproduces for me from "emacs -Q": (progn (run-at-time 1 1 (lambda ())) (pop-to-buffer "foo.txt") (text-mode) (flyspell-mode) (insert (propertize (make-string 20000 ?x) 'display "foo") "\n\n")) If you hit "d", the mode line says "Narrow", and hitting RET will remove the narrowing, and repeating that repeats the toggle. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 18 10:15:06 2022 Received: (at 57207) by debbugs.gnu.org; 18 Aug 2022 14:15:06 +0000 Received: from localhost ([127.0.0.1]:56407 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOgIc-00088Z-A8 for submit@debbugs.gnu.org; Thu, 18 Aug 2022 10:15:06 -0400 Received: from quimby.gnus.org ([95.216.78.240]:57402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOgIa-00087U-ET for 57207@debbugs.gnu.org; Thu, 18 Aug 2022 10:15:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Gs0GqOJo/ZbVThKypiFPSXRp8etZuEZbIv9Jrz38avQ=; b=XHAZX79qiAbyY6UMlDr8pE41gN J3boj+BJCxMLuFBIEMtPOJD40UqqxC2kEyo8cbLY1LBOA1sTAd/yiC0lXfjaO8LRzuDjGKSHtFY4W QR236ajFd4UE1XHF7saJFjFiqmR2OXiIo9VpIFzK7Ay6rT1HgPx5ayJ7bsZ8ai2T/L9Q=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oOgIS-0008KX-9Q; Thu, 18 Aug 2022 16:14:58 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <87fshtwsys.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 18 Aug 2022 16:02:03 +0200") References: <87bksmx1j1.fsf@localhost> <83lerqkd2u.fsf@gnu.org> <87o7wl4tsv.fsf@localhost> <87r11h90zw.fsf@gnus.org> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> X-Now-Playing: The Dead C's _Being for the Benefit of =?utf-8?Q?Kaf=C3=A9?= =?utf-8?Q?_H=C3=A6rverk!=5F=3A?= "Untitled Oslo" Date: Thu, 18 Aug 2022 16:14:54 +0200 Message-ID: <877d35wsdd.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Simplified recipe: (progn (pop-to-buffer "foo.txt") (flyspell-mode) (insert (propertize (make-string 20000 ?x) 'display "foo") "\n\n")) Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Simplified recipe: (progn (pop-to-buffer "foo.txt") (flyspell-mode) (insert (propertize (make-string 20000 ?x) 'display "foo") "\n\n")) From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 18 10:32:19 2022 Received: (at 57207) by debbugs.gnu.org; 18 Aug 2022 14:32:19 +0000 Received: from localhost ([127.0.0.1]:56442 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOgZH-0000Ad-86 for submit@debbugs.gnu.org; Thu, 18 Aug 2022 10:32:19 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45450) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOgZF-0000AS-SX for 57207@debbugs.gnu.org; Thu, 18 Aug 2022 10:32:18 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47970) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOgZA-0005GK-Ji; Thu, 18 Aug 2022 10:32:12 -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=CeyrA55V5ppZulgiDO/Mx3rfk9Oh0skh0m35pMijKZM=; b=SL7PdtUCAIgu nG/kBtTEHk/bwxw2B6qOIcH4i08PznwnRFCtBbMgls97YmGS5FYYoGvvUkk9qGN1t+3sFiO94anKY fLWblG2z+xGO6g+VLBEg0wM4InJjo8l+kX43eDiCUD58i07KVZ0KJ3KDbaCHJOIzijSQkLojANaCo ix4TCmuuYW/Ly2la2ZrQB/58CcA3i0+GiTClxco8BNIVt5rk8E1KavyK3bcrgiXlQ3LR2O1xwnNnh wyiZgfsacUyDzyn04AUREjnauzAlBDLSQyDjbpuPpbdazvUkB6ibUVYJWUJbpoWuikgxNtyxSbrIX FshVccXw5K3bHgemdBFjjw==; Received: from [87.69.77.57] (port=4077 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 1oOgZA-0000uy-21; Thu, 18 Aug 2022 10:32:12 -0400 Date: Thu, 18 Aug 2022 17:32:04 +0300 Message-Id: <83ilmpfwrf.fsf@gnu.org> From: Eli Zaretskii To: Lars Ingebrigtsen In-Reply-To: <877d35wsdd.fsf@gnus.org> (message from Lars Ingebrigtsen on Thu, 18 Aug 2022 16:14:54 +0200) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <83lerqkd2u.fsf@gnu.org> <87o7wl4tsv.fsf@localhost> <87r11h90zw.fsf@gnus.org> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: yantar92@gmail.com, 57207@debbugs.gnu.org > Date: Thu, 18 Aug 2022 16:14:54 +0200 > > Simplified recipe: > > (progn > (pop-to-buffer "foo.txt") > (flyspell-mode) > (insert (propertize (make-string 20000 ?x) 'display "foo") > "\n\n")) Still no "Narrow" on the mode line. But it's clear that one needs pre-command-hook or post-command-hook to reproduce. So the question becomes: why doesn't the narrowing get unwound? Perhaps because we should do it in safe_run_hooks_maybe_narrowed, instead of inside narrow_to_region_internal? From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 18 10:38:17 2022 Received: (at 57207) by debbugs.gnu.org; 18 Aug 2022 14:38:17 +0000 Received: from localhost ([127.0.0.1]:56446 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOgf3-0000KJ-0E for submit@debbugs.gnu.org; Thu, 18 Aug 2022 10:38:17 -0400 Received: from quimby.gnus.org ([95.216.78.240]:57664) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOgf1-0000K6-83 for 57207@debbugs.gnu.org; Thu, 18 Aug 2022 10:38:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=qlijsiZtNSYX6LMHFQin4Jg0sJTsg6YYsbKF26QDpHk=; b=apPyMZ3gQ9D7YHP8w4aH8syff4 XJHYAX8zYkUNz9k3tpOql4BvOPWYzNU283ePe2pt4tQ5PtptrhAMQ+2g0F0fUMkjQ3f3fjh1aMOz/ 75XtKZpTSLv3dgK7XEu50V9hq4XZy4TdfAOb5sywPZWzsoGbg3e1MFmtRJtziVw4h/KI=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oOges-000054-1b; Thu, 18 Aug 2022 16:38:08 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <83ilmpfwrf.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 18 Aug 2022 17:32:04 +0300") References: <87bksmx1j1.fsf@localhost> <83lerqkd2u.fsf@gnu.org> <87o7wl4tsv.fsf@localhost> <87r11h90zw.fsf@gnus.org> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> X-Now-Playing: DNA- AND-'s _Being for the Benefit of =?utf-8?Q?Kaf=C3=A9?= =?utf-8?Q?_H=C3=A6rverk!=5F=3A?= "Here We Go Again" Date: Thu, 18 Aug 2022 16:38:04 +0200 Message-ID: <8735dtwrar.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: >> (progn >> (pop-to-buffer "foo.txt") >> (flyspell-mode) >> (insert (propertize (make-string 20000 ?x) 'display "foo") >> "\n\n")) > > Still no "Narrow" on the mode line. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> (progn >> (pop-to-buffer "foo.txt") >> (flyspell-mode) >> (insert (propertize (make-string 20000 ?x) 'display "foo") >> "\n\n")) > > Still no "Narrow" on the mode line. Did you type a character after eval-ing that? From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 18 11:50:02 2022 Received: (at 57207) by debbugs.gnu.org; 18 Aug 2022 15:50:02 +0000 Received: from localhost ([127.0.0.1]:56522 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOhmT-0002Cr-K5 for submit@debbugs.gnu.org; Thu, 18 Aug 2022 11:50:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41980) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOhmS-0002CX-4K for 57207@debbugs.gnu.org; Thu, 18 Aug 2022 11:50:00 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43364) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOhmK-0006wu-NJ; Thu, 18 Aug 2022 11:49:54 -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=fFcgYTsRkH+TdJhB69Yi54pNutA3vJQ6yBPGhc3xecI=; b=SV684okPGvXP 4goDxwKyupyJ2Nlj94dLa1JgW/yM1cQ4Qmu9WQVrcu48zctQ8qOSA6FOR6rFlGRC4ncmZgZi5/+YA gN19huw8P+eqCqqIU4k6WbcCybVAfjZQXomQ2sNpBfwD0800ldPjbvx2U6VQY8SVcibYdZcWK04lc aQs7KSroTrtaSa0bPHG4/T0giRfPS3FYqXAdiGMRlhAfK/YwcQ39/6IWRw1ii+oYxt/2PQ7PKfKg3 TkPsSS6udSkkxCvy3mutBuaGbLPnJaC7BdznHzD98KKqkP/uZ5Vtb+bCJ7//vZ/cESd4eljDAvjS8 xdL2n8MB4oe/U5f2iTyrPA==; Received: from [87.69.77.57] (port=4835 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 1oOhmI-0001a2-J8; Thu, 18 Aug 2022 11:49:52 -0400 Date: Thu, 18 Aug 2022 18:49:43 +0300 Message-Id: <83h729ft60.fsf@gnu.org> From: Eli Zaretskii To: Lars Ingebrigtsen In-Reply-To: <8735dtwrar.fsf@gnus.org> (message from Lars Ingebrigtsen on Thu, 18 Aug 2022 16:38:04 +0200) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <83lerqkd2u.fsf@gnu.org> <87o7wl4tsv.fsf@localhost> <87r11h90zw.fsf@gnus.org> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: yantar92@gmail.com, 57207@debbugs.gnu.org > Date: Thu, 18 Aug 2022 16:38:04 +0200 > > Eli Zaretskii writes: > > >> (progn > >> (pop-to-buffer "foo.txt") > >> (flyspell-mode) > >> (insert (propertize (make-string 20000 ?x) 'display "foo") > >> "\n\n")) > > > > Still no "Narrow" on the mode line. > > Did you type a character after eval-ing that? Yes. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 19 08:02:14 2022 Received: (at 57207) by debbugs.gnu.org; 19 Aug 2022 12:02:14 +0000 Received: from localhost ([127.0.0.1]:57472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oP0hZ-000470-O5 for submit@debbugs.gnu.org; Fri, 19 Aug 2022 08:02:13 -0400 Received: from quimby.gnus.org ([95.216.78.240]:38310) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oP0hX-00046n-Be for 57207@debbugs.gnu.org; Fri, 19 Aug 2022 08:02:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=6KyD5Ex78ybZe2WlVaA90ke+YEPzf1MbLyeVDsidVfI=; b=LUUioBI8jeH9n8eaXC5f5jOZVE GQZH6/bh8DB+LKDm2d1mBse/I+Ztjs7CoU/LMFgGMu/03RdBRPMLNePxu3fLyg5YKrXwWXnH7cPvy uRFJV362rv8Sxqiqz3thvN2IQ8fLutlNpehkqbIS5n2F7mw/LmjTFdhkZPlPc75DJDwk=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oP0hO-0006vQ-5f; Fri, 19 Aug 2022 14:02:04 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <83h729ft60.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 18 Aug 2022 18:49:43 +0300") References: <87bksmx1j1.fsf@localhost> <83lerqkd2u.fsf@gnu.org> <87o7wl4tsv.fsf@localhost> <87r11h90zw.fsf@gnus.org> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAJ1BMVEX9/f3S0tMgHx4O DAyPj5BSUVGwr7AtLCtgX19wb3C+v8KAf3////+zg4Q9AAAAAWJLR0QMgbNRYwAAAAd0SU1FB+YI Ews7LHwqjbUAAAGASURBVDjLvZJNT8JAEIZnE6hy2wZS4WjXhHjdsYI3iR+EKyWCNzCA4WbakHI0 FCLe/AD0B/gn/HduW2y7pRx1mnab98nMuzuzACIIo+BH5qYwbqIfgWBvQFa7cuw4mAYLLJWBhXEw CBblheS4BEZE9ayuAe5RAkPQ1r45NWXQE9WOqAr5hiWDrngvjFbPXCdK0dztso68Z/abMgCFusjb 1GWYAAD7TKcgrPUkgLuJ6ABW2iwBvuwWiIxyNZlRGtcAXLTP3WQpQr2M45WdBF6DTeRbuwraj5gK CNsBFPwL8CqBXKifxmUKeyHoxsElef/VDfkUB2GCQWWL6OD8XErJ45Z7zfuokTlWfVmrV4GolGYj 4NsXRU0gbxMt1txKoHsbJzHZByX/5xFooRkDHDLBDA6hsGrExoGwmf0JeUIpIKw5YKlAuBdZKngA zU0FxrA/TQVYsdJLcRY8Omfi1vEInI0WnVln8T3/nM9nz4uPKMPSRTi6ZZWdsuVYgDviP8APOLuy Sfn2JkEAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjItMDgtMTlUMTE6NTk6NDQrMDA6MDDMbuL4AAAA JXRFWHRkYXRlOm1vZGlmeQAyMDIyLTA4LTE5VDExOjU5OjQ0KzAwOjAwvTNaRAAAAABJRU5ErkJg gg== X-Now-Playing: Winston Tong's _Theoretically Chinese_: "Yellow Peril" Date: Fri, 19 Aug 2022 14:02:01 +0200 Message-ID: <87tu68v3uu.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: >> >> (progn >> >> (pop-to-buffer "foo.txt") >> >> (flyspell-mode) >> >> (insert (propertize (make-string 20000 ?x) 'display "foo") >> >> "\n\n")) >> > >> > Still no "Narrow" on the mode line. >> >> D [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> >> (progn >> >> (pop-to-buffer "foo.txt") >> >> (flyspell-mode) >> >> (insert (propertize (make-string 20000 ?x) 'display "foo") >> >> "\n\n")) >> > >> > Still no "Narrow" on the mode line. >> >> Did you type a character after eval-ing that? > > Yes. Odd. I can reproduce this both on Ubuntu and Debian. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 19 08:22:27 2022 Received: (at 57207) by debbugs.gnu.org; 19 Aug 2022 12:22:27 +0000 Received: from localhost ([127.0.0.1]:57529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oP119-0006pu-0Q for submit@debbugs.gnu.org; Fri, 19 Aug 2022 08:22:27 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35900) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oP116-0006ph-UE for 57207@debbugs.gnu.org; Fri, 19 Aug 2022 08:22:25 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44532) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oP111-0006un-5U; Fri, 19 Aug 2022 08:22:19 -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=Sx+1HE+N1lDGH0DDmTZo6Koh3BDmucK9c1QMusQ/nN0=; b=i2UpG9bunDga 7GHbZRM+xMZp1f7ixTMhf5uMbPva/qqeraQJg9KXxto0iGQ9o9TMAw8dEEXgbSvXdsb5dQRLfnw7p bQjE3Zar2TwVckDtzqS545aooV81ce9f+jnuAl7n+lz1uU8LLXKuxcM0pgBoFMoi5J/rnJJJ7K14C NlAT+ei2cNAxDtmQbxWnYC7+KqiOqkS/5lHm3jcVNdwWuHiaF36HeWEgrERT/MoKmrmgdrSj8swh0 PcJsDf6lnJ2ecPDbL4F9kKSrIhWRmTevYgvgDc/U4N1ca3+I2n7zIYlMPjQxkYGEcFCv/K+7GicEP 2bm7Y1ZE+1NA7yK84IvLuQ==; Received: from [87.69.77.57] (port=1094 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 1oP110-0000JJ-4j; Fri, 19 Aug 2022 08:22:18 -0400 Date: Fri, 19 Aug 2022 15:22:13 +0300 Message-Id: <83tu68e83u.fsf@gnu.org> From: Eli Zaretskii To: Lars Ingebrigtsen In-Reply-To: <87tu68v3uu.fsf@gnus.org> (message from Lars Ingebrigtsen on Fri, 19 Aug 2022 14:02:01 +0200) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <83lerqkd2u.fsf@gnu.org> <87o7wl4tsv.fsf@localhost> <87r11h90zw.fsf@gnus.org> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: yantar92@gmail.com, 57207@debbugs.gnu.org > Date: Fri, 19 Aug 2022 14:02:01 +0200 > > Eli Zaretskii writes: > > >> >> (progn > >> >> (pop-to-buffer "foo.txt") > >> >> (flyspell-mode) > >> >> (insert (propertize (make-string 20000 ?x) 'display "foo") > >> >> "\n\n")) > >> > > >> > Still no "Narrow" on the mode line. > >> > >> Did you type a character after eval-ing that? > > > > Yes. > > Odd. I can reproduce this both on Ubuntu and Debian. Is it true that the call which makes the narrowing comes from safe_run_hooks_maybe_narrowed in your case? If so, can you step through the code after the narrowing and try to figure out why isn't narrowing undone after the hook function returns? From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 19 11:50:15 2022 Received: (at 57207) by debbugs.gnu.org; 19 Aug 2022 15:50:15 +0000 Received: from localhost ([127.0.0.1]:59156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oP4GE-00023P-VB for submit@debbugs.gnu.org; Fri, 19 Aug 2022 11:50:15 -0400 Received: from quimby.gnus.org ([95.216.78.240]:40174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oP4GC-000236-K3 for 57207@debbugs.gnu.org; Fri, 19 Aug 2022 11:50:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=mrCe99gkNuROVmfRcoby2a0d9n9E4jZ1tI1ICmg7V5c=; b=IV2j7nmZBVwMEu8ESD/35VP3/v Aothz3edVSdxWGovsW913+5efnWHYJTiHWNN93FdHF0FEdwPygH3mgNBC7vuycXFsrN4Bj/tgwtlq kxoWflPs6/f8F3SIpMdI0bg2JCtem86GcQWWkP0m6htYLRsiKwwWnuh9W8xN1sDxlBRo=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oP4G3-0002OR-Mv; Fri, 19 Aug 2022 17:50:05 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <83tu68e83u.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 19 Aug 2022 15:22:13 +0300") References: <87bksmx1j1.fsf@localhost> <83lerqkd2u.fsf@gnu.org> <87o7wl4tsv.fsf@localhost> <87r11h90zw.fsf@gnus.org> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> X-Now-Playing: Various's _We Are Not Alone Pt. 1_: "Jerk Off" Date: Fri, 19 Aug 2022 17:50:03 +0200 Message-ID: <87fshsteqc.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > Is it true that the call which makes the narrowing comes from > safe_run_hooks_maybe_narrowed in your case? If so, can you step > through the code after the narrowing and try to figure out why isn't [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: > Is it true that the call which makes the narrowing comes from > safe_run_hooks_maybe_narrowed in your case? If so, can you step > through the code after the narrowing and try to figure out why isn't > narrowing undone after the hook function returns? I'm not sure, but that function is being called when I hit a key, at least: Thread 1 "emacs" hit Breakpoint 3, safe_run_hooks_maybe_narrowed (hook=hook@entry=XIL(0xcc90), w=0x55555614ba18) at keyboard.c:1929 1929 { (gdb) bt #0 safe_run_hooks_maybe_narrowed (hook=hook@entry=XIL(0xcc90), w=0x55555614ba18) at keyboard.c:1929 #1 0x00005555556ed677 in command_loop_1 () at keyboard.c:1467 #2 0x0000555555767977 in internal_condition_case (bfun=bfun@entry=0x5555556ed300 , handlers=handlers@entry=XIL(0x90), hfun=hfun@entry=0x5555556e0410 ) at eval.c:1497 #3 0x00005555556d89fe in command_loop_2 (handlers=handlers@entry=XIL(0x90)) at keyboard.c:1132 #4 0x00005555557678b9 in internal_catch (tag=tag@entry=XIL(0xf7e0), func=func@entry=0x5555556d89d0 , arg=arg@entry=XIL(0x90)) at eval.c:1220 #5 0x00005555556d8999 in command_loop () at keyboard.c:1110 #6 0x00005555556dff68 in recursive_edit_1 () at keyboard.c:719 #7 0x00005555556e0310 in Frecursive_edit () at keyboard.c:802 #8 0x00005555555ad6a9 in main (argc=, argv=) From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 19 12:02:59 2022 Received: (at 57207) by debbugs.gnu.org; 19 Aug 2022 16:02:59 +0000 Received: from localhost ([127.0.0.1]:59160 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oP4SZ-0002Ma-Bj for submit@debbugs.gnu.org; Fri, 19 Aug 2022 12:02:59 -0400 Received: from quimby.gnus.org ([95.216.78.240]:40260) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oP4SM-0002MA-MO for 57207@debbugs.gnu.org; Fri, 19 Aug 2022 12:02:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=yUr4jAL3Iidh858dQe+3fMLfQ5jJP5wgLN5fJiFmQwc=; b=bZo3qBnkjdQCUn7xvB6N4pEYW1 BpfAH6QTOa+7hW3gf44FDwa8afBSytVY886I1tpVAzXZaYP57MCbWT+y1IxaU9oDhdkgJkDIvx4vx eeA8o2MqMAlH1k91X4xnaHxGUGjH45Ba8TdrMXYnCjFfLLQebLps9qK5DYlvjOvEFhMY=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oP4SD-0002aU-S8; Fri, 19 Aug 2022 18:02:39 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <87fshsteqc.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 19 Aug 2022 17:50:03 +0200") References: <87bksmx1j1.fsf@localhost> <83lerqkd2u.fsf@gnu.org> <87o7wl4tsv.fsf@localhost> <87r11h90zw.fsf@gnus.org> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> X-Now-Playing: Beatrice Dillon's _Workaround_: "Workaround Three" Date: Fri, 19 Aug 2022 18:02:37 +0200 Message-ID: <87bksgte5e.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: I tried reproducing this on Macos, but it doesn't happen there. Are there Linux-specific code paths in this narrowing code? Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) I tried reproducing this on Macos, but it doesn't happen there. Are there Linux-specific code paths in this narrowing code? From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 19 12:08:12 2022 Received: (at 57207) by debbugs.gnu.org; 19 Aug 2022 16:08:12 +0000 Received: from localhost ([127.0.0.1]:59172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oP4Xc-0002US-0a for submit@debbugs.gnu.org; Fri, 19 Aug 2022 12:08:12 -0400 Received: from quimby.gnus.org ([95.216.78.240]:40352) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oP4Xa-0002UE-0L for 57207@debbugs.gnu.org; Fri, 19 Aug 2022 12:08:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=/hvxKUz+G7vnHCJHyrqeB7b44cJKn2BUNJsXu5C7Pac=; b=AujAOwoVj5sgtkdBNdPovcN+a0 IVQSDHno/0VMm91dXygucAEU6AUG17/LCKhNbK7/mo+vdCZpiky49KAaftZvs56XlT1IgPxJrauMM nwUANb0k/88esJyS1NpQixUrZmWxi0RrkFz+geGFXxm1QX/jVfPnCCC/p9HxzSbe9MY0=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oP4XR-0002gZ-4e; Fri, 19 Aug 2022 18:08:03 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <87bksgte5e.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 19 Aug 2022 18:02:37 +0200") References: <87bksmx1j1.fsf@localhost> <87o7wl4tsv.fsf@localhost> <87r11h90zw.fsf@gnus.org> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> X-Now-Playing: Beatrice Dillon's _Workaround_: "Workaround Four" Date: Fri, 19 Aug 2022 18:08:00 +0200 Message-ID: <877d34tdwf.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Lars Ingebrigtsen writes: > I tried reproducing this on Macos, but it doesn't happen there. Are > there Linux-specific code paths in this narrowing code? No, hang on -- I can reproduce it on Macos, too, after installing ispell. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Lars Ingebrigtsen writes: > I tried reproducing this on Macos, but it doesn't happen there. Are > there Linux-specific code paths in this narrowing code? No, hang on -- I can reproduce it on Macos, too, after installing ispell. Could the reason you're not seeing this be because flyspell-mode doesn't trigger for you? From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 19 12:11:51 2022 Received: (at 57207) by debbugs.gnu.org; 19 Aug 2022 16:11:51 +0000 Received: from localhost ([127.0.0.1]:59178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oP4b9-0002a3-HO for submit@debbugs.gnu.org; Fri, 19 Aug 2022 12:11:51 -0400 Received: from eggs.gnu.org ([209.51.188.92]:32940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oP4b4-0002Zn-Me for 57207@debbugs.gnu.org; Fri, 19 Aug 2022 12:11:49 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40102) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oP4az-0002rf-ES; Fri, 19 Aug 2022 12:11:41 -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=Yp05kzXmF2GJkyv6KTpl6xygLonbIxFdyw4+Up8JvQQ=; b=EtR9hpp+8kzy ONKiXWdukzV1ozFXyeIb2/LG1BPVxbEwRa9exMGD+BBPdAXuAgARpFi7r3hdbQM8e6ilwx4byG2wo e0RhdXGiTi/GjcsgNal/3tBxp0PPBVHm2WCw8d7p/VA6rZS2ttgqLO5H0OLZpHZ4yzwub8MDsWS// jg2oOz3U1FhxIAzC3H/vdJpTfsaIQWG3/Bw6G5f09lKuiuv8Cu3QH4ReoivujX2eN7Iht1FE6/N3G ruQJY1EypcgOVU4KtPWobCM8F1/UPXckab9DQ8fWRnaxjdU0NNfwqxHXGB+vhrk4zvLdKo49bD0uO zRDNNuYLncfeG13S43DaBw==; Received: from [87.69.77.57] (port=3870 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 1oP4ay-0000Rb-Tg; Fri, 19 Aug 2022 12:11:41 -0400 Date: Fri, 19 Aug 2022 19:11:38 +0300 Message-Id: <83pmgwdxhh.fsf@gnu.org> From: Eli Zaretskii To: Lars Ingebrigtsen In-Reply-To: <877d34tdwf.fsf@gnus.org> (message from Lars Ingebrigtsen on Fri, 19 Aug 2022 18:08:00 +0200) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <87o7wl4tsv.fsf@localhost> <87r11h90zw.fsf@gnus.org> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: 57207@debbugs.gnu.org, yantar92@gmail.com > Date: Fri, 19 Aug 2022 18:08:00 +0200 > > Lars Ingebrigtsen writes: > > > I tried reproducing this on Macos, but it doesn't happen there. Are > > there Linux-specific code paths in this narrowing code? > > No, hang on -- I can reproduce it on Macos, too, after installing > ispell. > > Could the reason you're not seeing this be because flyspell-mode doesn't > trigger for you? What do you mean by "does not trigger"? The function safe_run_hooks_maybe_narrowed does get called, and I see the symbol of the post-command-hook it runs. Didn't you say the reproduction recipe doesn't work in "emacs -Q", only in some session of yours? If so, maybe what you have in that session explains why you see it and I don't? From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 19 12:12:39 2022 Received: (at 57207) by debbugs.gnu.org; 19 Aug 2022 16:12:39 +0000 Received: from localhost ([127.0.0.1]:59183 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oP4bu-0002bS-RL for submit@debbugs.gnu.org; Fri, 19 Aug 2022 12:12:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oP4bs-0002bF-RJ for 57207@debbugs.gnu.org; Fri, 19 Aug 2022 12:12:37 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54166) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oP4bn-00034N-LM; Fri, 19 Aug 2022 12:12:31 -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=iujS2DnJK8M9UNw9xdO4nn9ppvKWotRJZTDiguthiCM=; b=UiEyS4GV2MNg m1eI0rKPZ6UzqHQgFFjPnLOlwZq1Y9kjLLFTAYVQUWwN7JD27bCtUxbceZBbRM5HLJAi2Ra21jWpF e/0ZfbiA1A4GiUEbyOihu4LmyKdD3ccvoYgZ5ftxboxeowQCp0CjbFegExBoxZOAzrFvL0kHPIwgF dMvw/UchaN8MCNMK6ExISyTlU7yZicf8QnY6UgnVoxgQuJACQx9zMSaQQKQUOxy6LST6Nc3jNl0rp gX7IltbxJhS0o+i+xLI244LiBtO7MRcSU3bax/L2pYAOTrOxINzHwAd0MyO9SZjsdHgZvjS+QU1gg v2JxzAiY4hSUepZspXI2/w==; Received: from [87.69.77.57] (port=3921 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 1oP4bm-0000dO-Su; Fri, 19 Aug 2022 12:12:31 -0400 Date: Fri, 19 Aug 2022 19:12:28 +0300 Message-Id: <83o7wgdxg3.fsf@gnu.org> From: Eli Zaretskii To: Lars Ingebrigtsen In-Reply-To: <87fshsteqc.fsf@gnus.org> (message from Lars Ingebrigtsen on Fri, 19 Aug 2022 17:50:03 +0200) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <83lerqkd2u.fsf@gnu.org> <87o7wl4tsv.fsf@localhost> <87r11h90zw.fsf@gnus.org> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: yantar92@gmail.com, 57207@debbugs.gnu.org > Date: Fri, 19 Aug 2022 17:50:03 +0200 > > Eli Zaretskii writes: > > > Is it true that the call which makes the narrowing comes from > > safe_run_hooks_maybe_narrowed in your case? If so, can you step > > through the code after the narrowing and try to figure out why isn't > > narrowing undone after the hook function returns? > > I'm not sure, but that function is being called when I hit a key, at least: And when you step through safe_run_hooks_maybe_narrowed, are BEGV and ZV values restored when it returns? From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 19 12:17:05 2022 Received: (at 57207) by debbugs.gnu.org; 19 Aug 2022 16:17:05 +0000 Received: from localhost ([127.0.0.1]:59191 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oP4gC-0002j3-ST for submit@debbugs.gnu.org; Fri, 19 Aug 2022 12:17:05 -0400 Received: from quimby.gnus.org ([95.216.78.240]:40416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oP4gA-0002iN-HU for 57207@debbugs.gnu.org; Fri, 19 Aug 2022 12:17:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=DJ2fSTiHDHl9z+CQaggLbOw3p/tmKIXB1qLTQ6ZlYrY=; b=ZJVY+sowUKVMH4mxSfDYfNfpxB 3dBdI1Vhj1pxf/J6Lg2JRT5vI6mghLixWKo1nl9Wv3Mf0mZIiTfqlYhcTgm4ASSHkgcqMrnCJhSDB yyBsmu/H5t+9r8Bu+HLtKXCmq+bR0fH1ghJSwf/FD1LUhNLp8Yngv0t5nsPZX65LIGxo=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oP4g0-0002q0-RH; Fri, 19 Aug 2022 18:16:55 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <83pmgwdxhh.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 19 Aug 2022 19:11:38 +0300") References: <87bksmx1j1.fsf@localhost> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> X-Now-Playing: Beatrice Dillon's _Workaround_: "Clouds Strum" Date: Fri, 19 Aug 2022 18:16:52 +0200 Message-ID: <8735dstdhn.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: >> Could the reason you're not seeing this be because flyspell-mode doesn't >> trigger for you? > > What do you mean by "does not trigger"? That flyspell-mode doesn't work. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> Could the reason you're not seeing this be because flyspell-mode doesn't >> trigger for you? > > What do you mean by "does not trigger"? That flyspell-mode doesn't work. > Didn't you say the reproduction recipe doesn't work in "emacs -Q", > only in some session of yours? If so, maybe what you have in that > session explains why you see it and I don't? No, I can reproduce it from "emacs -Q" fine, both on Linux and Macos. Eval this: (progn (pop-to-buffer "foo.txt") (flyspell-mode) (insert (propertize (make-string 20000 ?x) 'display "foo") "\n\n")) Then type "d". [Narrow] is shown in the mode line. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 19 12:20:41 2022 Received: (at 57207) by debbugs.gnu.org; 19 Aug 2022 16:20:41 +0000 Received: from localhost ([127.0.0.1]:59195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oP4jh-0002oZ-Dv for submit@debbugs.gnu.org; Fri, 19 Aug 2022 12:20:41 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:45959) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oP4je-0002oK-E8 for 57207@debbugs.gnu.org; Fri, 19 Aug 2022 12:20:40 -0400 Received: by mail-pl1-f193.google.com with SMTP id u22so4529782plq.12 for <57207@debbugs.gnu.org>; Fri, 19 Aug 2022 09:20:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from:from:to:cc; bh=LXTpIQ6vhIq+Nk0yazKTnRnpzdxqueqtDJhmWTi4EcY=; b=WZABz25r93VPhvTGT93oWQF+dq5BRkcX93/GXCmg0GYYXK/H/R21gq8HKCZAR5koZt RkReoh0lcC530DT4p9kdYmuwjl3zk9Bffsqhqxz2ykIUyX+uC57TuIahWfCjPT7ExJJd 2WAHC3hwUiU4JBIJ6IWcF98ZJFLh0B4+vplaths3Mqbp7Z9BvHxRTYwrgrx5ns93J9R8 Brs8A6NShvEN4WYHYM434Q8gEz/OFHSTrB9qHlpZFg53HRTyvZ0P9UEJPla8eb5woDpK reU/X1GFdrivTMS7reCYyhDrMPtCl/+/jo8tZK51MLSZdXoVu06TnaGj0HRs4EQ5G97I LyOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc; bh=LXTpIQ6vhIq+Nk0yazKTnRnpzdxqueqtDJhmWTi4EcY=; b=k+pQhQop0NXjKkUPR5+kma+F57XeDzSxeT+hfR0uIeS8fE1OO1O/FL1GK/laYW4lbM 0P20ToNFDLQM4/W/zL3mnjUkC1CZkM2Zcvxpo8xOW1THu1pzQSq6/yPS0qUVSlLY2Xbu Olya3n0bpXdd5+LHRGnyy8xbobvT4xphQGtXlcTkrWDaSdv+h4wpBwy7sf9oNglhpe3h fC/+FhoBODX3mWGQi+ppYrNRpa74VanlJ02YmlclM9hOrtA+YX5E2LYT/gwkbHW6mHR4 dLaj53zLJVxRyKlsDFoh9ltmlh7vHWzU09UnMxR4/Pnwj9clAq4HcrD8E5fXnO+dWfpP T1Og== X-Gm-Message-State: ACgBeo2YuaaxvwKhyCYY/MntGR4G2XX+J5OSk//IdfPhDvH1yHdz7i/e 9WVhrJovijWIDVosmqGSVXw= X-Google-Smtp-Source: AA6agR7d6Fkb9QNDBoeL1zzjf2utRZGR03Y8v5CUYtYcMGn8ChIxT5VP8HPidCiSF5Xpu7HA+kqBZg== X-Received: by 2002:a17:902:e548:b0:172:aafb:4927 with SMTP id n8-20020a170902e54800b00172aafb4927mr8303865plf.106.1660926032700; Fri, 19 Aug 2022 09:20:32 -0700 (PDT) Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id i19-20020a63e913000000b0041a6638b357sm3009396pgh.72.2022.08.19.09.20.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Aug 2022 09:20:32 -0700 (PDT) From: Visuwesh To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <83pmgwdxhh.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 19 Aug 2022 19:11:38 +0300") References: <87bksmx1j1.fsf@localhost> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Date: Fri, 19 Aug 2022 21:50:19 +0530 Message-ID: <87h728ciik.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 57207 Cc: Lars Ingebrigtsen , 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) [=E0=AE=B5=E0=AF=86=E0=AE=B3=E0=AF=8D=E0=AE=B3=E0=AE=BF =E0=AE=86=E0=AE=95= =E0=AE=B8=E0=AF=8D=E0=AE=9F=E0=AF=8D 19, 2022] Eli Zaretskii wrote: > Didn't you say the reproduction recipe doesn't work in "emacs -Q", > only in some session of yours? If so, maybe what you have in that > session explains why you see it and I don't? I can reproduce it in emacs -Q using the recipe Lars posted upthread. (progn (pop-to-buffer "foo.txt") (flyspell-mode) (insert (propertize (make-string 20000 ?x) 'display "foo") "\n\n")) If I type 'a' in EOB, I see Narrow appear in the mode-line if I move using C-p, it disappears. If I insert a character again, it reappears. I'm on Debian, and the git HEAD is % git log |head -6 commit f117b5df4dc69a38a5568c5926c1e417a35314eb Author: Lars Ingebrigtsen Date: Fri Aug 19 15:22:29 2022 +0200 Add new functions eol and bol From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 19 13:22:05 2022 Received: (at 57207) by debbugs.gnu.org; 19 Aug 2022 17:22:05 +0000 Received: from localhost ([127.0.0.1]:59241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oP5h7-0006Yu-AH for submit@debbugs.gnu.org; Fri, 19 Aug 2022 13:22:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49938) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oP5h5-0006YO-Qg for 57207@debbugs.gnu.org; Fri, 19 Aug 2022 13:22:04 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:52336) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oP5h0-0004i8-Dx; Fri, 19 Aug 2022 13:21:58 -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=au4Jpg781P3JkxzNO4433s1pYz0LasSYnnt1eX0f8No=; b=VbewRJ3trvgd lY7a6Tccc4Dz5oh0O1z2ZFC4PAvZ3Tdsw+g/NoNkKEVHNywrZx34r27iT0g1o9iYAdnKVzbczxsBq 5WDLOblSXKokvguLe1seN7lsxIFaFEPfIU7Wkp7ata2G6CUafeMCTLBS8VkzTj4yzW8rT8+NaphS6 c9m/igemmFajdMfXdA1floI3SMHE89T5BacZH19xWoUpCRdCzw1PUvsPMBm8JlPqkLTrwvmdq5qOG 2Zu9nsoWhAwgb02k5FfjhqW+4rBdrBQJ8p8Iljsa8aq5qg617FfKUGvghtjMybmRIfrTs9Ry1mBzc T5QnLU89AO0MkyVzb5FxIg==; Received: from [87.69.77.57] (port=4171 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 1oP5gz-0001FL-TK; Fri, 19 Aug 2022 13:21:58 -0400 Date: Fri, 19 Aug 2022 20:21:55 +0300 Message-Id: <83mtc0du8c.fsf@gnu.org> From: Eli Zaretskii To: Lars Ingebrigtsen In-Reply-To: <8735dstdhn.fsf@gnus.org> (message from Lars Ingebrigtsen on Fri, 19 Aug 2022 18:16:52 +0200) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: 57207@debbugs.gnu.org, yantar92@gmail.com > Date: Fri, 19 Aug 2022 18:16:52 +0200 > > Eli Zaretskii writes: > > >> Could the reason you're not seeing this be because flyspell-mode doesn't > >> trigger for you? > > > > What do you mean by "does not trigger"? > > That flyspell-mode doesn't work. It does work. > Eval this: > > (progn > (pop-to-buffer "foo.txt") > (flyspell-mode) > (insert (propertize (make-string 20000 ?x) 'display "foo") > "\n\n")) > > Then type "d". [Narrow] is shown in the mode line. I types "s". Does it matter what you type? From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 19 13:22:54 2022 Received: (at 57207) by debbugs.gnu.org; 19 Aug 2022 17:22:55 +0000 Received: from localhost ([127.0.0.1]:59245 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oP5hu-0006Zz-LY for submit@debbugs.gnu.org; Fri, 19 Aug 2022 13:22:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35530) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oP5hs-0006Zm-UD for 57207@debbugs.gnu.org; Fri, 19 Aug 2022 13:22:53 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46464) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oP5hn-0004vS-8L; Fri, 19 Aug 2022 13:22:47 -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=sKg8PRDBhHT7zmiz17t3YBuDJDI6UOwhfQmD6GFPBss=; b=ijj2bJ+Ke1sU xqeAmT1riLdFSanuGHdCEz/pU4q5wWHf9MrfWf825Nbe6yfhh2P7mMq4899sduqQJD4l+mtA/fqci siN4d6TEzlRwpd1DrDRYzEbZp8pRpbPyX+zX9btLOwYyk4ZHdbKfkpfJ6oNvZD+iPstgZaXrnMV/F NT6hnF+SZfYgjVfv+U5bZXZVEp0DTkTYLx/liq5dwLZgLIYlWwAX0cLoHRE6tr2h358e7Ww1KEYow XlEGEEBnSF4ssvglCyUIwr7/dZj0VfS6AXqzQWwrg3fu39AkVgaTJReuCPHaQVvF78/0ju18h6gxH GnWMx4go5SM4hKKx6CFmNw==; Received: from [87.69.77.57] (port=4221 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 1oP5hm-0001Nv-Ix; Fri, 19 Aug 2022 13:22:46 -0400 Date: Fri, 19 Aug 2022 20:22:44 +0300 Message-Id: <83lerkdu6z.fsf@gnu.org> From: Eli Zaretskii To: Visuwesh In-Reply-To: <87h728ciik.fsf@gmail.com> (message from Visuwesh on Fri, 19 Aug 2022 21:50:19 +0530) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <87h728ciik.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: larsi@gnus.org, 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Visuwesh > Cc: Lars Ingebrigtsen , 57207@debbugs.gnu.org, > yantar92@gmail.com > Date: Fri, 19 Aug 2022 21:50:19 +0530 > > I can reproduce it in emacs -Q using the recipe Lars posted upthread. > > (progn > (pop-to-buffer "foo.txt") > (flyspell-mode) > (insert (propertize (make-string 20000 ?x) 'display "foo") > "\n\n")) > > If I type 'a' in EOB, I see Narrow appear in the mode-line if I move > using C-p, it disappears. If I insert a character again, it reappears. > I'm on Debian, and the git HEAD is I did believe Lars, I just don't see it on my system. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 19 13:25:36 2022 Received: (at 57207) by debbugs.gnu.org; 19 Aug 2022 17:25:37 +0000 Received: from localhost ([127.0.0.1]:59257 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oP5kW-0006fU-Mz for submit@debbugs.gnu.org; Fri, 19 Aug 2022 13:25:36 -0400 Received: from quimby.gnus.org ([95.216.78.240]:40864) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oP5kT-0006fF-IW for 57207@debbugs.gnu.org; Fri, 19 Aug 2022 13:25:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Bowe4dOlAEkpYC14zBHWGntx0Ucw5uydJ87GyTSX9i0=; b=M6pcrBKsT8iW4EnM/2Gxgh+faf iDLa2Oc+bQu1B8Qnat5NS1lVsl/LeXtoNHS5QEVy0ImwFNrDh0YTUT+LXdykwby28P1N9trFd7odd DDWnuBgTns5Y94gX74tqYtgxQ8RFiRp68EYsonh7CtU1AXB6/p4zY6WCTjWpkr75g77E=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oP5kK-0004F3-Qh; Fri, 19 Aug 2022 19:25:26 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <83mtc0du8c.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 19 Aug 2022 20:21:55 +0300") References: <87bksmx1j1.fsf@localhost> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> <83mtc0du8c.fsf@gnu.org> X-Now-Playing: Mourning A BLKstar's _The Cycle_: "Hard (Stars Remix)" Date: Fri, 19 Aug 2022 19:25:24 +0200 Message-ID: <87wnb4rvqz.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > I types "s". Does it matter what you type? Nope. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: > I types "s". Does it matter what you type? Nope. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 19 13:51:49 2022 Received: (at 57207) by debbugs.gnu.org; 19 Aug 2022 17:51:49 +0000 Received: from localhost ([127.0.0.1]:59269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oP69s-0007MB-P7 for submit@debbugs.gnu.org; Fri, 19 Aug 2022 13:51:49 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48080) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oP69o-0007Lu-94 for 57207@debbugs.gnu.org; Fri, 19 Aug 2022 13:51:47 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60478) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oP69i-0000zd-Sq; Fri, 19 Aug 2022 13:51:38 -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=k4rYzAUQlWx2Q1q+gPp4TpPdSldVrXcOZKoyRLN6kKU=; b=Ew/pP0qisLmp KP5YwLYTPUiPvnpS11pzIbKEtnyramWHhJFTLBcP9g7aBuMp3Ps4nxBiEJnIhR5telDZU0TrcKxqy mI5PGo/yRwbNOVv7wlfCGSoXffLKs2hKhjAasVmYr4GQRVLwBFXahUw5keAa3MZdae9Dut/K7s/YE iZvXAuudivbfJO1NbLK4g+Y6AyDOY8OdCT240WBTdlXSHW3odGTAbU3QO3ouhuFvTOHQAAvK+ICk+ 2lqd5k7jxagXKLhWh6OTxrEoZsVPIj7JFSzrlT0ndYZeapE7ta1mxAOSsH+djU3y0h0yANJNUf895 xDUA6LitjjpvnvKlwVC67Q==; Received: from [87.69.77.57] (port=2038 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 1oP69i-0001D0-Bg; Fri, 19 Aug 2022 13:51:38 -0400 Date: Fri, 19 Aug 2022 20:51:34 +0300 Message-Id: <83k074dsux.fsf@gnu.org> From: Eli Zaretskii To: Lars Ingebrigtsen In-Reply-To: <87wnb4rvqz.fsf@gnus.org> (message from Lars Ingebrigtsen on Fri, 19 Aug 2022 19:25:24 +0200) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> <83mtc0du8c.fsf@gnu.org> <87wnb4rvqz.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: 57207@debbugs.gnu.org, yantar92@gmail.com > Date: Fri, 19 Aug 2022 19:25:24 +0200 > > Eli Zaretskii writes: > > > I types "s". Does it matter what you type? > > Nope. Ah, I know what's causing this: flyspell calls redisplay (via sit-for) inside its post-command-hook. So I think this basically means we cannot narrow the buffer while calling pre- and post-command-hooks, because any of them can trigger redisplay, and that will show "Narrow" on the mode line. (I also understand why I didn't see the problem on my system: it's because the recipe signals an error here, and flyspell-mode isn't completely enabled.) From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 20 05:16:10 2022 Received: (at 57207) by debbugs.gnu.org; 20 Aug 2022 09:16:10 +0000 Received: from localhost ([127.0.0.1]:59559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPKaQ-0001BM-5X for submit@debbugs.gnu.org; Sat, 20 Aug 2022 05:16:10 -0400 Received: from quimby.gnus.org ([95.216.78.240]:47534) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPKaN-0001AY-1i for 57207@debbugs.gnu.org; Sat, 20 Aug 2022 05:16:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=0IuKWqLYuRAqVBm6oi291gCI8sRN1J9PocRftj8g7Gg=; b=HlTscY1nuIu5MT+/4qUCVogjQJ +oXcV7Rzz0F8hCVxpva/+Sd8hnqOHJkE36lBy9Bgp2gYgUjeOqguyxllLiaZ++XCC5M2YeprZUabj SLrtC86tc+Bjw8t71WY5Hb4MGNvNmADrbFmb/Pcke66ZekxtlHhl5JpkRq4gB/znhMFU=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oPKa9-0002za-P5; Sat, 20 Aug 2022 11:15:59 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <83k074dsux.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 19 Aug 2022 20:51:34 +0300") References: <87bksmx1j1.fsf@localhost> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> <83mtc0du8c.fsf@gnu.org> <87wnb4rvqz.fsf@gnus.org> <83k074dsux.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEX+/v7q4N7TwrRe gHi8qB/27Q3///9D3i1BAAAAAWJLR0QGYWa4fQAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1F B+YIExUqCutGpSIAAAFYSURBVDjLzZPBbsMwCIZJpt27Vr23SXNfTV5gMb6vlXn/VxnY2HWSXSfN VaWED/gBB4A/ON2HnMPe3qMbhhEvO3BCFDvedwDzcTsFA7hVuRVw3UgHyvaZN9LRE+FMfqZ1XTei QIGZPX2tpGeiqHaO87KS0ABOx1NTVzeWAAVLJUeORGaXXIFzyceJmRpAkvMpaNI3IlNQkFyewBnI G7WAX0B/LZhqREnFOdU5Ab8FD3i3iGjAgr+hrzUWkFwu0PFKJNpspHsDFlNaBQNyHUFla06w1kvv JfAp4Mwxy2tM0XoI0HqjAE9UlaRaSPXGQJGQXkO+GFDEjb0BoqtVUQO6OiX5l4h0u3V6i6+TSXc7 ZfeIDtGHUNqAPHheRqef6K22YY3IarhrL8wFayOpq3mQ1TiiPpk2wHA4oesGWabeHUa8d8PrYx/E RyLePiE57Lbwl93MavBPzg9nrrmV9TqjMAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wOC0xOVQy MTo0MjoxMCswMDowMDXOyWMAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDgtMTlUMjE6NDI6MTAr MDA6MDBEk3HfAAAAAElFTkSuQmCC X-Now-Playing: Various's _Deathbomb Digital Singles Club Year 2_: "Sludge" Date: Sat, 20 Aug 2022 11:15:51 +0200 Message-ID: <87k073qnqw.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > Ah, I know what's causing this: flyspell calls redisplay (via sit-for) > inside its post-command-hook. > > So I think this basically means we cannot narrow the buffer while > calling pre- and post-c [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: > Ah, I know what's causing this: flyspell calls redisplay (via sit-for) > inside its post-command-hook. > > So I think this basically means we cannot narrow the buffer while > calling pre- and post-command-hooks, because any of them can trigger > redisplay, and that will show "Narrow" on the mode line. Would binding `inhibit-redisplay' there help? From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 20 05:30:02 2022 Received: (at 57207) by debbugs.gnu.org; 20 Aug 2022 09:30:02 +0000 Received: from localhost ([127.0.0.1]:59588 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPKnp-0001XE-Ru for submit@debbugs.gnu.org; Sat, 20 Aug 2022 05:30:02 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50234) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPKnn-0001X0-52 for 57207@debbugs.gnu.org; Sat, 20 Aug 2022 05:30:01 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48114) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPKnh-0003tT-Th; Sat, 20 Aug 2022 05:29:53 -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=Ja3JySF4XOb8mCq7WA3FUEStQHv/Ec9/j5zedz0mCL0=; b=hI2/gejFRJwQ 9s/RSc1k7w+NF1NpvpPdvxi7nrs0Vpp3C6PXNqJs/wUxIW/yTVzkl6vHec5jAFXHivkmrsVxhlvys cQZNkU9jRiLlJS5YbHZwWidb32zI7IxOgyfsR6EGHWU7s1X86VwDH6JbKQDo0qmj9T6P2xJepmwv+ p2bjNXgY4KrpcUfFa8DLHgVF/zR8gIxVVhueoNrOMA+VrNqfueTV6jyQIvpvbpn0Q5LU19J5V6PES TOzDVNSZAGrjBJsihhSSQ79j5zKSmX6Dt+OcZUrupkdy4+/T2e72lKhraOk82PVLVwAKDJBVx6Kln 8zzo0tZ9wnWb4KV1gv5VEQ==; Received: from [87.69.77.57] (port=3708 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 1oPKnh-00074D-DZ; Sat, 20 Aug 2022 05:29:53 -0400 Date: Sat, 20 Aug 2022 12:29:51 +0300 Message-Id: <83bksfdzzk.fsf@gnu.org> From: Eli Zaretskii To: Lars Ingebrigtsen In-Reply-To: <87k073qnqw.fsf@gnus.org> (message from Lars Ingebrigtsen on Sat, 20 Aug 2022 11:15:51 +0200) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> <83mtc0du8c.fsf@gnu.org> <87wnb4rvqz.fsf@gnus.org> <83k074dsux.fsf@gnu.org> <87k073qnqw.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: 57207@debbugs.gnu.org, yantar92@gmail.com > Date: Sat, 20 Aug 2022 11:15:51 +0200 > > Eli Zaretskii writes: > > > Ah, I know what's causing this: flyspell calls redisplay (via sit-for) > > inside its post-command-hook. > > > > So I think this basically means we cannot narrow the buffer while > > calling pre- and post-command-hooks, because any of them can trigger > > redisplay, and that will show "Narrow" on the mode line. > > Would binding `inhibit-redisplay' there help? Maybe it will, but how can we do that? It would break any pre- and post-command hooks that do need to trigger redisplay. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 20 05:57:54 2022 Received: (at 57207) by debbugs.gnu.org; 20 Aug 2022 09:57:54 +0000 Received: from localhost ([127.0.0.1]:59632 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPLEo-0004Qo-Bg for submit@debbugs.gnu.org; Sat, 20 Aug 2022 05:57:54 -0400 Received: from quimby.gnus.org ([95.216.78.240]:47980) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPLEn-0004Qd-9x for 57207@debbugs.gnu.org; Sat, 20 Aug 2022 05:57:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=tSYmMKOoCFe77NhphzMtus3pc/SwcAqPfxHUR01puPk=; b=UkNOCiz331uLj1i436S7hwhPPs XL+0QNF2l2RKZXUZ29Jnpy/mYq6pqQ9gximKoIIfpXjyi4AkKwby6k2hIjF12UNAMKbtib+nU6vDo YCt3fVMTpo7yjBlkZQW9HdfM4FyZymNGxf/M65B65SQiVnhJmUAQQrp/lZBfMPoXdxa0=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oPLEe-0003ZX-W3; Sat, 20 Aug 2022 11:57:47 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <83bksfdzzk.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 20 Aug 2022 12:29:51 +0300") References: <87bksmx1j1.fsf@localhost> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> <83mtc0du8c.fsf@gnu.org> <87wnb4rvqz.fsf@gnus.org> <83k074dsux.fsf@gnu.org> <87k073qnqw.fsf@gnus.org> <83bksfdzzk.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEX+/v7q4N7TwrRe gHi8qB/27Q3///9D3i1BAAAAAWJLR0QGYWa4fQAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1F B+YIExUqCutGpSIAAAFYSURBVDjLzZPBbsMwCIZJpt27Vr23SXNfTV5gMb6vlXn/VxnY2HWSXSfN VaWED/gBB4A/ON2HnMPe3qMbhhEvO3BCFDvedwDzcTsFA7hVuRVw3UgHyvaZN9LRE+FMfqZ1XTei QIGZPX2tpGeiqHaO87KS0ABOx1NTVzeWAAVLJUeORGaXXIFzyceJmRpAkvMpaNI3IlNQkFyewBnI G7WAX0B/LZhqREnFOdU5Ab8FD3i3iGjAgr+hrzUWkFwu0PFKJNpspHsDFlNaBQNyHUFla06w1kvv JfAp4Mwxy2tM0XoI0HqjAE9UlaRaSPXGQJGQXkO+GFDEjb0BoqtVUQO6OiX5l4h0u3V6i6+TSXc7 ZfeIDtGHUNqAPHheRqef6K22YY3IarhrL8wFayOpq3mQ1TiiPpk2wHA4oesGWabeHUa8d8PrYx/E RyLePiE57Lbwl93MavBPzg9nrrmV9TqjMAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wOC0xOVQy MTo0MjoxMCswMDowMDXOyWMAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDgtMTlUMjE6NDI6MTAr MDA6MDBEk3HfAAAAAElFTkSuQmCC X-Now-Playing: Various's _Deathbomb Digital Singles Club Year 2_: "Creeping of the Foul" Date: Sat, 20 Aug 2022 11:57:44 +0200 Message-ID: <87h727p78n.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: >> Would binding `inhibit-redisplay' there help? > > Maybe it will, but how can we do that? It would break any pre- and > post-command hooks that do need to trigger redisplay. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> Would binding `inhibit-redisplay' there help? > > Maybe it will, but how can we do that? It would break any pre- and > post-command hooks that do need to trigger redisplay. Do they need to while in this hard-narrow mode? Hm... probably. I'm not quite understanding why we're narrowing here in the first place. Point is not in a long line in this test case -- there's just a long line (hidden under a display property) earlier in the buffer. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 20 06:33:42 2022 Received: (at 57207) by debbugs.gnu.org; 20 Aug 2022 10:33:42 +0000 Received: from localhost ([127.0.0.1]:59670 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPLnS-0007ci-Gl for submit@debbugs.gnu.org; Sat, 20 Aug 2022 06:33:42 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36004) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPLnO-0007cS-0c for 57207@debbugs.gnu.org; Sat, 20 Aug 2022 06:33:41 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42876) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPLnH-000446-N5; Sat, 20 Aug 2022 06:33:31 -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=v2VeglY3BwgM19CRJci++WZJCJYfqbde/vF19bMWunc=; b=JwiWQUbsrTWA Hi/HDP1zqd+NDvxnO+RLC0PhgDAzu14v+9TxMZGIJLKgFMKzEGi4BInYPa09vxF13nnqGKVyp+sFx /5oW2s+X7BPng2jgw178JYr4aLXMVXhVaGAnLZAnEYP7i80IgU8VMmlJjFCZR1YgAK772vk1cCaOd THVSIr8ttUR3BaYSBS7Mvs2SNq1anw9gA701w2SBeHucMQYDIdM3yO+nCIz7xzMhJHpLfuo7yKNa6 oAepRPGC0HmjZxgNepbMORz/i9h+Y0BwkrwonqIlFC4/Adib4aMkq9ZL7yznjiByAONfw45oC7FJz gT/jGjMMBFoDqA3e7DX3Gw==; Received: from [87.69.77.57] (port=4157 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 1oPLnH-0007fI-53; Sat, 20 Aug 2022 06:33:31 -0400 Date: Sat, 20 Aug 2022 13:33:29 +0300 Message-Id: <83a67zdx1i.fsf@gnu.org> From: Eli Zaretskii To: Lars Ingebrigtsen In-Reply-To: <87h727p78n.fsf@gnus.org> (message from Lars Ingebrigtsen on Sat, 20 Aug 2022 11:57:44 +0200) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> <83mtc0du8c.fsf@gnu.org> <87wnb4rvqz.fsf@gnus.org> <83k074dsux.fsf@gnu.org> <87k073qnqw.fsf@gnus.org> <83bksfdzzk.fsf@gnu.org> <87h727p78n.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: 57207@debbugs.gnu.org, yantar92@gmail.com > Date: Sat, 20 Aug 2022 11:57:44 +0200 > > I'm not quite understanding why we're narrowing here in the first place. > Point is not in a long line in this test case -- there's just a long > line (hidden under a display property) earlier in the buffer. Once a single long line is detected, the flag is turned on in the buffer, and all the optimizations/shortcuts, including narrowing, are applied regardless. A long line hidden by a display property is indeed a problem: it doesn't present any issue for the display engine, but is still counted as a potential problem. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 20 12:50:14 2022 Received: (at 57207) by debbugs.gnu.org; 20 Aug 2022 16:50:14 +0000 Received: from localhost ([127.0.0.1]:33438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPRfq-0004xA-4D for submit@debbugs.gnu.org; Sat, 20 Aug 2022 12:50:14 -0400 Received: from heytings.org ([95.142.160.155]:33198) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPRfo-0004x0-Ns for 57207@debbugs.gnu.org; Sat, 20 Aug 2022 12:50:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1661014212; bh=DJsP+kL6MTAxonYsRr0/htl0KkhgpNeewKX4C1XwD34=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=tVCbgCNBgY8pWy/Cq0E7xajFM9Q7jEmqEXVGntdtMBxUbCvoeQ1jao6VQF/WoRn19 lUuxBkYILzN9H7tkkAZJShym31bpxVge+nXG83C+CWq9MOyqkhxqhax6hVT4mkM6dF JNCNvj8XyOj7DMHzYL3+p16aUs+/VYGWTbV80es1EHS4ykLbxKsUzib6dYPEewLRNG UeLBFANXZwF73+EypVCc+sTkVV+p/PTIT0q+25EYNbUVZXHVDDt61v1W/S/KgwpHRt 7N1cS+ilRD79MZBZ9dYSNrE9QR/CxX9KABulj/NEtKXyrT7RDehyvQPFOo8pXs7rKw agrcaq1vCt29A== Date: Sat, 20 Aug 2022 16:50:11 +0000 From: Gregory Heytings To: Ihor Radchenko Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <325f95fd2b82a19f6838@heytings.org> Message-ID: <37dd2827f539d0de2773@heytings.org> References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <83bksmka08.fsf@gnu.org> <325f95fd2b7c0cc80613@heytings.org> <83y1voflmb.fsf@gnu.org> <325f95fd2bce114fd74d@heytings.org> <87r11g1ieu.fsf@localhost> <325f95fd2b82a19f6838@heytings.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="KgXbyvh2Gl" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 57207 Cc: Eli Zaretskii , 57207@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --KgXbyvh2Gl Content-Type: text/plain; format=flowed; charset=us-ascii Ihor, any chance that you could try the patch (which I attach again to this post) and tell us if if solves your original problem, namely fontification that is slowed down in large Org files? --KgXbyvh2Gl Content-Type: text/x-diff; name=use_chars_modiff.patch Content-Transfer-Encoding: base64 Content-ID: <37dd2827f543b60658dd@heytings.org> Content-Disposition: attachment; filename=use_chars_modiff.patch ZGlmZiAtLWdpdCBhL3NyYy9idWZmZXIuaCBiL3NyYy9idWZmZXIuaA0KaW5k ZXggNDdiNGJkZjc0OS4uNzdmOWVhMjBhZiAxMDA2NDQNCi0tLSBhL3NyYy9i dWZmZXIuaA0KKysrIGIvc3JjL2J1ZmZlci5oDQpAQCAtMTQ5LDEyICsxNDks MTggQEAgI2RlZmluZSBCVUZfT1ZFUkxBWV9VTkNIQU5HRURfTU9ESUZJRUQo YnVmKSBcDQogI2RlZmluZSBCVUZfQkVHX1VOQ0hBTkdFRChidWYpICgoYnVm KS0+dGV4dC0+YmVnX3VuY2hhbmdlZCkNCiAjZGVmaW5lIEJVRl9FTkRfVU5D SEFOR0VEKGJ1ZikgKChidWYpLT50ZXh0LT5lbmRfdW5jaGFuZ2VkKQ0KIA0K KyNkZWZpbmUgQlVGX0NIQVJTX1VOQ0hBTkdFRF9NT0RJRklFRChidWYpIFwN CisgICgoYnVmKS0+dGV4dC0+Y2hhcnNfdW5jaGFuZ2VkX21vZGlmaWVkKQ0K Kw0KICNkZWZpbmUgVU5DSEFOR0VEX01PRElGSUVEIFwNCiAgIEJVRl9VTkNI QU5HRURfTU9ESUZJRUQgKGN1cnJlbnRfYnVmZmVyKQ0KICNkZWZpbmUgT1ZF UkxBWV9VTkNIQU5HRURfTU9ESUZJRUQgXA0KICAgQlVGX09WRVJMQVlfVU5D SEFOR0VEX01PRElGSUVEIChjdXJyZW50X2J1ZmZlcikNCiAjZGVmaW5lIEJF R19VTkNIQU5HRUQgQlVGX0JFR19VTkNIQU5HRUQgKGN1cnJlbnRfYnVmZmVy KQ0KICNkZWZpbmUgRU5EX1VOQ0hBTkdFRCBCVUZfRU5EX1VOQ0hBTkdFRCAo Y3VycmVudF9idWZmZXIpDQorDQorI2RlZmluZSBDSEFSU19VTkNIQU5HRURf TU9ESUZJRUQgXA0KKyAgQlVGX0NIQVJTX1VOQ0hBTkdFRF9NT0RJRklFRCAo Y3VycmVudF9idWZmZXIpDQogDA0KIC8qIEZ1bmN0aW9ucyB0byBzZXQgUFQg aW4gdGhlIGN1cnJlbnQgYnVmZmVyLCBvciBhbm90aGVyIGJ1ZmZlci4gICov DQogDQpAQCAtMjY4LDYgKzI3NCw5IEBAICNkZWZpbmUgRkVUQ0hfQllURShu KSAqKEJZVEVfUE9TX0FERFIgKChuKSkpDQogICAgICAgIGVuZF91bmNoYW5n ZWQgY29udGFpbiBubyB1c2VmdWwgaW5mb3JtYXRpb24uICAqLw0KICAgICBt b2RpZmZfY291bnQgb3ZlcmxheV91bmNoYW5nZWRfbW9kaWZpZWQ7DQogDQor ICAgIC8qIENIQVJTX01PRElGRiBhcyBvZiBsYXN0IHJlZGlzcGxheSB0aGF0 IGZpbmlzaGVkLiAgKi8NCisgICAgbW9kaWZmX2NvdW50IGNoYXJzX3VuY2hh bmdlZF9tb2RpZmllZDsNCisNCiAgICAgLyogUHJvcGVydGllcyBvZiB0aGlz IGJ1ZmZlcidzIHRleHQuICAqLw0KICAgICBJTlRFUlZBTCBpbnRlcnZhbHM7 DQogDQpkaWZmIC0tZ2l0IGEvc3JjL3hkaXNwLmMgYi9zcmMveGRpc3AuYw0K aW5kZXggMDI0OGU4ZTUzZi4uYzkyMjMxYWJjZiAxMDA2NDQNCi0tLSBhL3Ny Yy94ZGlzcC5jDQorKysgYi9zcmMveGRpc3AuYw0KQEAgLTE3MzIzLDYgKzE3 MzIzLDcgQEAgbWFya193aW5kb3dfZGlzcGxheV9hY2N1cmF0ZV8xIChzdHJ1 Y3Qgd2luZG93ICp3LCBib29sIGFjY3VyYXRlX3ApDQogDQogICAgICAgQlVG X1VOQ0hBTkdFRF9NT0RJRklFRCAoYikgPSBCVUZfTU9ESUZGIChiKTsNCiAg ICAgICBCVUZfT1ZFUkxBWV9VTkNIQU5HRURfTU9ESUZJRUQgKGIpID0gQlVG X09WRVJMQVlfTU9ESUZGIChiKTsNCisgICAgICBCVUZfQ0hBUlNfVU5DSEFO R0VEX01PRElGSUVEIChiKSA9IEJVRl9DSEFSU19NT0RJRkYgKGIpOw0KICAg ICAgIEJVRl9CRUdfVU5DSEFOR0VEIChiKSA9IEJVRl9HUFQgKGIpIC0gQlVG X0JFRyAoYik7DQogICAgICAgQlVGX0VORF9VTkNIQU5HRUQgKGIpID0gQlVG X1ogKGIpIC0gQlVGX0dQVCAoYik7DQogDQpAQCAtMTk1ODUsNyArMTk1ODYs NyBAQCByZWRpc3BsYXlfd2luZG93IChMaXNwX09iamVjdCB3aW5kb3csIGJv b2wganVzdF90aGlzX29uZV9wKQ0KICAgLyogQ2hlY2sgd2hldGhlciB0aGUg YnVmZmVyIHRvIGJlIGRpc3BsYXllZCBjb250YWlucyBsb25nIGxpbmVzLiAg Ki8NCiAgIGlmICghTklMUCAoVmxvbmdfbGluZV90aHJlc2hvbGQpDQogICAg ICAgJiYgIWN1cnJlbnRfYnVmZmVyLT5sb25nX2xpbmVfb3B0aW1pemF0aW9u c19wDQotICAgICAgJiYgTU9ESUZGIC0gVU5DSEFOR0VEX01PRElGSUVEID4g OCkNCisgICAgICAmJiBDSEFSU19NT0RJRkYgLSBDSEFSU19VTkNIQU5HRURf TU9ESUZJRUQgPiA4KQ0KICAgICB7DQogICAgICAgcHRyZGlmZl90IGN1ciwg bmV4dCwgZm91bmQsIG1heCA9IDAsIHRocmVzaG9sZDsNCiAgICAgICB0aHJl c2hvbGQgPSBYRklYTlVNIChWbG9uZ19saW5lX3RocmVzaG9sZCk7DQo= --KgXbyvh2Gl-- From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 20 13:14:40 2022 Received: (at 57207) by debbugs.gnu.org; 20 Aug 2022 17:14:40 +0000 Received: from localhost ([127.0.0.1]:33448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPS3T-0005Wv-TQ for submit@debbugs.gnu.org; Sat, 20 Aug 2022 13:14:40 -0400 Received: from heytings.org ([95.142.160.155]:33242) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPS3R-0005Wl-6i for 57207@debbugs.gnu.org; Sat, 20 Aug 2022 13:14:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1661015676; bh=6dDv9UPojOEgIx1Hi2kyyfzKb4YuaqUO9Q3FmbU8ziE=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=sexnCOfrTBfcX/2DpR79C9/R6k5wIMs/OjYSPJmbLtKu+BbkJK/ioUb7aMR2rKZgj iqcddfuEalT7UFPBJQcZ0xBmhFbbFzbJzL54nDaZdLL8fbibQBvUqMnpqHaGGEzOh/ BPyonDksr5B/Us0qlq2cGXEi1NYKjNOqFJ/Lv5PolyjksuSeApKficZcZ6fnL/2pYe Dl7qsXxZvs+8WUHZlEGJs6bHEqH0ASeVeOFOofUUgJeFFBo6H9ZEb2gvxO5wlTxLWv oS1M9sNdFjAjWhUqoMwdPnRoMdnewhQKvExtHSsm+1/xwpuxiqb1y8YUVPO6us6uT4 CCwH7lOA5HRyg== Date: Sat, 20 Aug 2022 17:14:35 +0000 From: Gregory Heytings To: Lars Ingebrigtsen Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <8735dstdhn.fsf@gnus.org> Message-ID: <37dd2827f52038e95791@heytings.org> References: <87bksmx1j1.fsf@localhost> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 57207 Cc: Eli Zaretskii , 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > > (progn > (pop-to-buffer "foo.txt") > (flyspell-mode) > (insert (propertize (make-string 20000 ?x) 'display "foo") > "\n\n")) > > Then type "d". [Narrow] is shown in the mode line. > I can reproduce that, too. The "Narrow" indication disappears with the next redisplay cycle, so it seems to be a not-too-grave issue (but a bug nonetheless). It could probably be solved by moving the calculation of "BUF_BEGV (b) > BUF_BEG (b) || BUF_ZV (b) < BUF_Z (b)" from decode_mode_spec to mark_window_display_accurate_1, which would set a one-bit field in struct buffer. WDYT? From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 20 13:26:30 2022 Received: (at 57207) by debbugs.gnu.org; 20 Aug 2022 17:26:30 +0000 Received: from localhost ([127.0.0.1]:33458 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPSEw-0005oj-Cd for submit@debbugs.gnu.org; Sat, 20 Aug 2022 13:26:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59132) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPSEv-0005oX-FH for 57207@debbugs.gnu.org; Sat, 20 Aug 2022 13:26:29 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51584) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPSEp-0002sH-TS; Sat, 20 Aug 2022 13:26:23 -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=N1lI0iQrmWk3U+MopXjUF8H9SoYUMLR+HXPGpvEg2R0=; b=GUPAmoVMNtiO g/DYVp+MLpbq128S6E70sO8dt0DfFAci00wQY7IITZY6wRXsJ9PmzmVtkjxA4e8R4OhuDY1K8UW3U n/adQSEmuJf2Z8LWBJfFb3msgnITEffNrETAcjtRREOQCyRO5FaR+rowBkGE1G8NmCr3Q8jhiALOJ /KDMPzGLrp9u3gA3FT4hC+L6qaFN9BXyMC1VDRjLosqYGUzW6Kgs6GUnyf2sa7biF2hXOayjYm9DS hEgea4zF++j4Wvn4m/xdA3gxH3K/U0A178tHyVzgvTgVq5bdePgSBl31XWeWtpZGWlsnUjwDEjgx8 3a/zgVWEX6vuV4cUflB+iQ==; Received: from [87.69.77.57] (port=1809 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 1oPSEn-00018E-TW; Sat, 20 Aug 2022 13:26:23 -0400 Date: Sat, 20 Aug 2022 20:26:22 +0300 Message-Id: <83wnb2ddxd.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings In-Reply-To: <37dd2827f52038e95791@heytings.org> (message from Gregory Heytings on Sat, 20 Aug 2022 17:14:35 +0000) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> <37dd2827f52038e95791@heytings.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: larsi@gnus.org, 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sat, 20 Aug 2022 17:14:35 +0000 > From: Gregory Heytings > cc: Eli Zaretskii , 57207@debbugs.gnu.org, yantar92@gmail.com > > > (progn > > (pop-to-buffer "foo.txt") > > (flyspell-mode) > > (insert (propertize (make-string 20000 ?x) 'display "foo") > > "\n\n")) > > > > Then type "d". [Narrow] is shown in the mode line. > > > > I can reproduce that, too. The "Narrow" indication disappears with the > next redisplay cycle, so it seems to be a not-too-grave issue (but a bug > nonetheless). It doesn't disappear if you keep typing fast enough, or lean on a key. > It could probably be solved by moving the calculation of "BUF_BEGV (b) > > BUF_BEG (b) || BUF_ZV (b) < BUF_Z (b)" from decode_mode_spec to > mark_window_display_accurate_1, which would set a one-bit field in struct > buffer. > > WDYT? That's too late, I think? How do we ensure after that the update of the mode-line (in case the hook really wants to change the restriction)? From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 20 13:46:24 2022 Received: (at 57207) by debbugs.gnu.org; 20 Aug 2022 17:46:24 +0000 Received: from localhost ([127.0.0.1]:33473 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPSYB-0006IG-S3 for submit@debbugs.gnu.org; Sat, 20 Aug 2022 13:46:24 -0400 Received: from heytings.org ([95.142.160.155]:33294) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPSY9-0006I8-R2 for 57207@debbugs.gnu.org; Sat, 20 Aug 2022 13:46:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1661017581; bh=Fdr6YEpsjgBsmPeJhIU7s8iwzDfvcEKWa/QS/yZUCcw=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=lpMaT1sAxEsVwzIF+IDF+CNO2kIDkF+uFi/MqZnkVa/p2Mc/V0STlAjZE9S1HeQOb U1bjL2+ThnmzoTFkfyuxVcBNQGAMSBJhBL81nX8+tk6Y/VDi6xbRB7WwTSgo176W+Y wPhxoCcGXfVvSUSSVQZC6f7mKpOwfSQrjc8D+UJ+ey4Cxr5CEU4/NbgNd0IXAILyn5 Cpc+I0JCYu9K7275lAPKWSxLn1Ty4/UkNbk/DeciWRAyI33wAzTGtrbMPxe0O5wgCo iVTdcpQiMTrTo5HuQsS5ZLHYW/A/mSloXNvWy4WOlcV7GN1PdUSH26MERnnNQNwtLT TihTd/m9wdvRg== Date: Sat, 20 Aug 2022 17:46:20 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <83wnb2ddxd.fsf@gnu.org> Message-ID: <37dd2827f57a3d664931@heytings.org> References: <87bksmx1j1.fsf@localhost> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> <37dd2827f52038e95791@heytings.org> <83wnb2ddxd.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 57207 Cc: larsi@gnus.org, 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> I can reproduce that, too. The "Narrow" indication disappears with the >> next redisplay cycle, so it seems to be a not-too-grave issue (but a >> bug nonetheless). > > It doesn't disappear if you keep typing fast enough, or lean on a key. > Indeed, it disappear and reappears. >> It could probably be solved by moving the calculation of "BUF_BEGV (b) >> > BUF_BEG (b) || BUF_ZV (b) < BUF_Z (b)" from decode_mode_spec to >> mark_window_display_accurate_1, which would set a one-bit field in >> struct buffer. >> >> WDYT? > > That's too late, I think? How do we ensure after that the update of the > mode-line (in case the hook really wants to change the restriction)? > Hmmm... I guess I need to think about this a bit more! From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 20 19:22:31 2022 Received: (at 57207) by debbugs.gnu.org; 20 Aug 2022 23:22:31 +0000 Received: from localhost ([127.0.0.1]:33599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPXnS-00064E-SX for submit@debbugs.gnu.org; Sat, 20 Aug 2022 19:22:31 -0400 Received: from heytings.org ([95.142.160.155]:33588) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPXnN-000640-Fx for 57207@debbugs.gnu.org; Sat, 20 Aug 2022 19:22:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1661037743; bh=Jx/quMsF29Wy4jXBP3CIoYb3VhUntIiIuBibcT0wzf0=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=oZbFudCN2grCjz5lANr+rEEAJVGRCKnZid8ylBBDbL+xhKjIS99NrUfFmhbfh9uzK h5vNt9x0FhaTwrCfmwl8+NkWIa1adOre97Q0xmp19jn8I03IidJjxxRDC83AhTyWcs Llrl6GIhwVOSVjM/6bjrQz51BXhyXgzNJ9tiIo/lQUE7qeEZHhGCav38rSh37oK04m q+luAuN7OaYTe2xCxi2n/+Q8AWnD5CDkcxBtBvhOYvIMdXWjz+oeY/zOnt8S2ESpK4 eEKTu7Pm5fQkQfGtq8ukiEn+4JDmcOh8FtKWyzQgmJudArYp65kvczpVdei7YIYLUa egZH11P0JlhwQ== Date: Sat, 20 Aug 2022 23:22:23 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <37dd2827f57a3d664931@heytings.org> Message-ID: <37dd2827f52c6a150684@heytings.org> References: <87bksmx1j1.fsf@localhost> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> <37dd2827f52038e95791@heytings.org> <83wnb2ddxd.fsf@gnu.org> <37dd2827f57a3d664931@heytings.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 57207 Cc: larsi@gnus.org, 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> That's too late, I think? How do we ensure after that the update of >> the mode-line (in case the hook really wants to change the >> restriction)? > > Hmmm... I guess I need to think about this a bit more! > Actually, that bug is a symptom of a problem that happens everywhere in decode_mode_spec: whenever BEGV and ZV are used, their values could be wrong if the calculation happens when locked narrowing is in effect. One thing I don't understand there is that in some places we use BEGV and ZV (namely, case 'i' and case 'I'), and everywhere else we use BUF_BEGV (b) and BUF_ZV (b). These should be equivalent given that b is set to current_buffer, but perhaps I'm missing something. Is it also guaranteed that XBUFFER (w->contents) == current_buffer? It seems that it is, but there is no eassert, so I'm not entirely sure. (I tried to add one and did not see the assertion fail.) From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 20 23:24:52 2022 Received: (at 57207) by debbugs.gnu.org; 21 Aug 2022 03:24:52 +0000 Received: from localhost ([127.0.0.1]:33647 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPba0-0003Y4-Hb for submit@debbugs.gnu.org; Sat, 20 Aug 2022 23:24:52 -0400 Received: from mail-pf1-f182.google.com ([209.85.210.182]:34334) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPbZy-0003Xp-DT for 57207@debbugs.gnu.org; Sat, 20 Aug 2022 23:24:50 -0400 Received: by mail-pf1-f182.google.com with SMTP id x19so4704734pfq.1 for <57207@debbugs.gnu.org>; Sat, 20 Aug 2022 20:24:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc; bh=cBN7yTQrCz7FNNPsCAZGbSz0HYCNMSXTbN4yNLCen2I=; b=EzFip+m41s0ZihX4WLCR0Rm/gdWUDwETAJGAjB0Df4XavtcFMsEiFL4cIBZuvFJ+/v xnJEDmhh3721UD9cvlNNKOtgE6Ih977/UM21KrETWVPYrfyJDwV89QtpE4mb4yRvJ27p FVE/9Iy7kIjvo8DiWmwrkcbS0fPImialXHIM+zhkQ6TKs7CtloST4i5kV3q+Bi+C2Hq1 GX7iqibEz2FmOojHIqJSxae1Ion26yOkTvHmz6rCy9RKJaOq3NnHtwVr3naard7miMiO 2zy/8vXMhsmPDHeSD5o92OsXb4MbJTIKuj48G97+5e5XM+7RWKUtQQGWCE7dbSK0fro+ 6uNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc; bh=cBN7yTQrCz7FNNPsCAZGbSz0HYCNMSXTbN4yNLCen2I=; b=jBO4J+plhbYZB3JIvXH+rQJUwJ6vYE+PmOkp8A6ZhiMHRD1KPYueJ9UyTjA9FyoDV/ zWrs94dGcF61jyqSl3WneqvpGWh89nMAC2jMutsbPklotgqyE2mLrw5spb3fR+gnBqi3 qZ2N+VXnM5CVxekWLJLD1qVezK8t/8P+cD3e3YjMGtrjWVWQNr1+B5Voc6YC6/1dUjZ0 q7Nby6zYJ9BtsVCn5/qYQfWDzbIdTtW1lUEGE9NG/4oyXIOdUym7WGEkAG9JyqADDY7g oJrHbsp9SXji9c4ZtzIPFbYTjs9erLguEa03Nrrdwxoagzx5+i31XwaWZy9eIV5I1P5Z Gwag== X-Gm-Message-State: ACgBeo2EvKShIQbk1rG3iosKi0TxNanwgkiBWwrJYTac1zZZP4qgH7oX 9ILbIFWLsFcyVhBJ3YJBNQs= X-Google-Smtp-Source: AA6agR7tStbWmBjQ37smumWY7rKVEhsB6kpkik0lOJwnngmg6hFbGUNSPsVAcYOMNploF5EvYFkPmA== X-Received: by 2002:a63:1205:0:b0:41c:cd74:a743 with SMTP id h5-20020a631205000000b0041ccd74a743mr12260279pgl.418.1661052284412; Sat, 20 Aug 2022 20:24:44 -0700 (PDT) Received: from localhost ([2409:8a70:2b9:1e80:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id y12-20020a17090a600c00b001f2ef3c7956sm7420051pji.25.2022.08.20.20.24.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Aug 2022 20:24:43 -0700 (PDT) From: Ihor Radchenko To: Gregory Heytings Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <37dd2827f539d0de2773@heytings.org> References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <83bksmka08.fsf@gnu.org> <325f95fd2b7c0cc80613@heytings.org> <83y1voflmb.fsf@gnu.org> <325f95fd2bce114fd74d@heytings.org> <87r11g1ieu.fsf@localhost> <325f95fd2b82a19f6838@heytings.org> <37dd2827f539d0de2773@heytings.org> Date: Sun, 21 Aug 2022 11:25:47 +0800 Message-ID: <87bksemg5g.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 57207 Cc: Eli Zaretskii , 57207@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Gregory Heytings writes: > Ihor, any chance that you could try the patch (which I attach again to > this post) and tell us if if solves your original problem, namely > fontification that is slowed down in large Org files? The patch does not appear to apply onto current master. -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92 From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 21 01:46:43 2022 Received: (at 57207) by debbugs.gnu.org; 21 Aug 2022 05:46:43 +0000 Received: from localhost ([127.0.0.1]:33686 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPdnH-0007BE-3y for submit@debbugs.gnu.org; Sun, 21 Aug 2022 01:46:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPdnE-0007B2-HY for 57207@debbugs.gnu.org; Sun, 21 Aug 2022 01:46:42 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37238) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPdn7-0002Nm-9M; Sun, 21 Aug 2022 01:46:34 -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=kpF+Xo0Y0cVF6V90DReJ/31lZ3egV8JPGhEhne8yEb4=; b=Ib4nbYCqJkGC gNO59dsvXeWUvhULVMhERC1ZYlpOF/yvWm16WBrggSGtW3O6jJkd1q/hX250BhxebjL9ZopWydqWe mArAzF9R572SCKW88nVmrezzeKo5Tx70btFgkW08FG4+x9EeYwnSiILcO2JudZKLgAMQ9zti2k6wK /WrgQ+w27FaWOj6mczUpAUwC1uCa19OVpOaYZ+FZaZSD0C+4jRH/Ti7OhmXsc+uIEK6kIMsMMranZ 6PGB9kqOdfGa3uyLr/9dU2Kv4IRo6WnxMxas7WASYiortfQX43eIKPam+8twAKCjpuEoIxzovpPol DuQX1uK43wnYk0f6Vlbt9Q==; Received: from [87.69.77.57] (port=3322 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 1oPdn5-0002Uk-8G; Sun, 21 Aug 2022 01:46:32 -0400 Date: Sun, 21 Aug 2022 08:46:32 +0300 Message-Id: <83tu66cfnr.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings In-Reply-To: <37dd2827f52c6a150684@heytings.org> (message from Gregory Heytings on Sat, 20 Aug 2022 23:22:23 +0000) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> <37dd2827f52038e95791@heytings.org> <83wnb2ddxd.fsf@gnu.org> <37dd2827f57a3d664931@heytings.org> <37dd2827f52c6a150684@heytings.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: larsi@gnus.org, 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sat, 20 Aug 2022 23:22:23 +0000 > From: Gregory Heytings > cc: larsi@gnus.org, 57207@debbugs.gnu.org, yantar92@gmail.com > > > Actually, that bug is a symptom of a problem that happens everywhere in > decode_mode_spec: whenever BEGV and ZV are used, their values could be > wrong if the calculation happens when locked narrowing is in effect. That's true, but only if redisplay is triggered while the narrowing is in effect. This is why the strategy of using narrowing as little as possible should be adhered to as meticulously as possible. Narrowing inside redisplay itself is okay, provided that it's undone before we call redisplay_mode_lines. Hooks and timer functions are especially problematic because they can run any arbitrary Lisp, and they can (and do) trigger redisplay as part of their code. > One thing I don't understand there is that in some places we use BEGV and > ZV (namely, case 'i' and case 'I'), and everywhere else we use BUF_BEGV > (b) and BUF_ZV (b). These should be equivalent given that b is set to > current_buffer, but perhaps I'm missing something. If you can be sure that b is the current buffer, then yes. > Is it also guaranteed that XBUFFER (w->contents) == current_buffer? No, not in general. Not even everywhere in redisplay_window, as I recently learned. But it is true in the low levels of the display code, the ones that use the iterator object and functions that manipulate iterators. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 21 05:01:33 2022 Received: (at 57207) by debbugs.gnu.org; 21 Aug 2022 09:01:33 +0000 Received: from localhost ([127.0.0.1]:33795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPgpp-0003jt-9T for submit@debbugs.gnu.org; Sun, 21 Aug 2022 05:01:33 -0400 Received: from heytings.org ([95.142.160.155]:34026) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPgpm-0003jj-KV for 57207@debbugs.gnu.org; Sun, 21 Aug 2022 05:01:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1661072489; bh=RBQykZ4VmPt8mhqb/JFfsekRU5s91BySq7m74dWt0x0=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=QfrG6QUjZ6hxHcBUYbjNIcTi4kjdpEvueCfgreHvz8YZDILDheLRycupGPAyMIb8c NgVKsFlUHN5QQGqHIU+RdDG6LcdFIdupTUPwTf7Q69e971KqzMt+h46HWVO8HkO6wU 14D0egUoqZ05CFMBCuWajFXM1UTCXNPO15w9sIw+jWL9keKL2DL7RCxDMOmzway5WX slEZxsFW05RG48lcd1xuGL28m5YK/ZO69uYq+y2UHgzD4afcU4KzNwbmLDDd3dnfXS 49rd8J0AZUdSjrOw63IBSD7BwcShO+FQMVhLetsVuqKfwhvS6MU6X7+skTzeBi+hfF mE8fVfIMkwevg== Date: Sun, 21 Aug 2022 09:01:29 +0000 From: Gregory Heytings To: Ihor Radchenko Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <87bksemg5g.fsf@localhost> Message-ID: References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <83bksmka08.fsf@gnu.org> <325f95fd2b7c0cc80613@heytings.org> <83y1voflmb.fsf@gnu.org> <325f95fd2bce114fd74d@heytings.org> <87r11g1ieu.fsf@localhost> <325f95fd2b82a19f6838@heytings.org> <37dd2827f539d0de2773@heytings.org> <87bksemg5g.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 57207 Cc: Eli Zaretskii , 57207@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> Ihor, any chance that you could try the patch (which I attach again to >> this post) and tell us if if solves your original problem, namely >> fontification that is slowed down in large Org files? > > The patch does not appear to apply onto current master. > It does here (at 8d4789c072), both with "git apply" and "patch -p1". Are you sure you're really on the master branch, without local modifications in src/buffer.h and src/xdisp.c? From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 21 07:43:46 2022 Received: (at 57207) by debbugs.gnu.org; 21 Aug 2022 11:43:46 +0000 Received: from localhost ([127.0.0.1]:33901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPjMo-0003oP-4k for submit@debbugs.gnu.org; Sun, 21 Aug 2022 07:43:46 -0400 Received: from heytings.org ([95.142.160.155]:34180) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPjMk-0003oE-RH for 57207@debbugs.gnu.org; Sun, 21 Aug 2022 07:43:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1661082221; bh=J9IC/jGbTdOZ1ElddQEDzWz4EwfP1NFbIpBFVasCuZg=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=8UycHJYRouhQ3HIcdP+EW/7i2orYiK4bxbrBy1Z0SxFOfegf0cBhWk30Dj/ASzpl+ AP+VoLNxFfcbjXi/uPN4NAEG8J2Fm81+8GwRRyjfTKKN2p/chOFeLfHL8YCJmKUjAk XvRchh6v2I9YUKkz9Hsbq/u0uqDUKak930RpiT9hDCKES/0h1ktge7n2cu6yIzwpao /UkVFT4g9ZX0bL0uhkXanjycPPZ3S1dfzFWvnkCi+eZPyh/HPEA0oJOYtXT3UYB3yb r6vyxgZz+nNRA257juA/dzevNyrmFvAvdCNaKoylTmxOU13Kq1g8PdOX+Q5sLcveIi bpjvpQftRtVBw== Date: Sun, 21 Aug 2022 11:43:41 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <83tu66cfnr.fsf@gnu.org> Message-ID: References: <87bksmx1j1.fsf@localhost> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> <37dd2827f52038e95791@heytings.org> <83wnb2ddxd.fsf@gnu.org> <37dd2827f57a3d664931@heytings.org> <37dd2827f52c6a150684@heytings.org> <83tu66cfnr.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 57207 Cc: larsi@gnus.org, 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > > Narrowing inside redisplay itself is okay, provided that it's undone > before we call redisplay_mode_lines. > I pushed a potential fix to the feature branch. Does that look correct to you? It seems to me (but I could very well be wrong) that if we use the actual narrowing bounds inside decode_mode_spec, the mode line will contain the correct information. Another way to do it would be to unset and reset the locked narrowing for each buffer in the loop inside redisplay_mode_lines, I think. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 21 08:02:28 2022 Received: (at 57207) by debbugs.gnu.org; 21 Aug 2022 12:02:28 +0000 Received: from localhost ([127.0.0.1]:33939 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPjet-0004MV-Na for submit@debbugs.gnu.org; Sun, 21 Aug 2022 08:02:28 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43460) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPjeq-0004M0-Sb for 57207@debbugs.gnu.org; Sun, 21 Aug 2022 08:02:26 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51768) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPjel-00044l-J1; Sun, 21 Aug 2022 08:02:19 -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=8JTDZs4jSoxbsROfnrtMCXvWgcTWf+R1BSaU+Tgnc7M=; b=r6B5A3t+t3xd An+KwOgC84NiUowkRXAvwlDEmwda+/YIKuLrl2rS7nMTXmEDudIXqu8U8D0ggzxIrhIVFph+J9IiG bTD/blOubXvmd0lmbn3aFORc70f5jufc64UwkGgsRAdxFiJEI66+PTkhABqhvbnUpKWZt0Ah60qi4 1rv5I3qFVRmcQaSCoikhzcSCMRpWMk0l9xhjfghjahbWcdo8Xtnv0uXOC0dMlk2nxuaUqnNDuPv6Z xu3MZiqnUGbYsYiMlT/owYh5VbxIVj1rbojA4sIlNoF/cbgtNY4zdsLGrd1ARJdJ4UP93+i4zFjsS 9i1aObXLxmHHrYYCwKRCRg==; Received: from [87.69.77.57] (port=3634 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 1oPjek-00030f-9v; Sun, 21 Aug 2022 08:02:19 -0400 Date: Sun, 21 Aug 2022 15:02:18 +0300 Message-Id: <83fshpdctx.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings In-Reply-To: (message from Gregory Heytings on Sun, 21 Aug 2022 11:43:41 +0000) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> <37dd2827f52038e95791@heytings.org> <83wnb2ddxd.fsf@gnu.org> <37dd2827f57a3d664931@heytings.org> <37dd2827f52c6a150684@heytings.org> <83tu66cfnr.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: larsi@gnus.org, 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sun, 21 Aug 2022 11:43:41 +0000 > From: Gregory Heytings > cc: larsi@gnus.org, 57207@debbugs.gnu.org, yantar92@gmail.com > > > Narrowing inside redisplay itself is okay, provided that it's undone > > before we call redisplay_mode_lines. > > I pushed a potential fix to the feature branch. Does that look correct to > you? It seems to me (but I could very well be wrong) that if we use the > actual narrowing bounds inside decode_mode_spec, the mode line will > contain the correct information. Is locked narrowing intended to be used only for pre- and post-command hooks and similar stuff? That is, is it not intended for use from any other Lisp program? Also, do we know for sure that only the "outermost" narrowing is supposed to be reflected on the mode line? > Another way to do it would be to unset and reset the locked > narrowing for each buffer in the loop inside redisplay_mode_lines, I > think. Why not in redisplay_internal? TBH, I'm extremely nervous about forced narrowing in pre- and post-command hooks. Those hooks can run arbitrary Lisp and assume they can access the buffer without any unexpected restrictions. I think applying narrowing here runs afoul of the principle of enforcing the narrowing in as few places as possible, which IMO is the only way this technique can avoid breaking too many things. If some package puts on these hooks stuff that could run awry when long lines are present, I'd rather we fixed those packages and/or applied narrowing "by hand" in their hook functions. Since long-line-optimizations-p is not exposed to Lisp, there should be no difficulty in doing that. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 21 08:08:32 2022 Received: (at 57207) by debbugs.gnu.org; 21 Aug 2022 12:08:32 +0000 Received: from localhost ([127.0.0.1]:33951 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPjkm-0004VN-Bi for submit@debbugs.gnu.org; Sun, 21 Aug 2022 08:08:32 -0400 Received: from quimby.gnus.org ([95.216.78.240]:41634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPjkj-0004V9-EV for 57207@debbugs.gnu.org; Sun, 21 Aug 2022 08:08:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=7xuiUcTNE3Ofh2s8xI5hIUv1fF++nqx+gNPWh6nhils=; b=Sql1Tqq+52NDTn/6dPllQlwRjf /fwsdtMNHd92O8/+a4x2Lhphavs7a1Sd+i8UlJQF7kfgDnJLQgds9GbWH0DjrfQab9cvXTjOifqh1 CZiEhEyO5rlJc5bCUQcGWjmSH4B+BpvgaucmpVR+9V4e+LCl3J9rO58QQtET+p3+5XXs=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oPjkZ-0001fs-Q0; Sun, 21 Aug 2022 14:08:21 +0200 From: Lars Ingebrigtsen To: Gregory Heytings Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <37dd2827f52038e95791@heytings.org> (Gregory Heytings's message of "Sat, 20 Aug 2022 17:14:35 +0000") References: <87bksmx1j1.fsf@localhost> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> <37dd2827f52038e95791@heytings.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEUTBgZdJiewdjL/ //8rHmheAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+YIFQslEKJvkTEAAAFVSURBVCjPRZK9asMwEMdP QRJtJhtkSDR1KIXmKRSIO0uQ85Apgw2tn8KBdk+XQDt1cEqtp+xJiu0bJP38v5PuwwA3yzLLQeXo RF4i2R6y3LnC4bZ0ARytOZZREYjKUsgeBQfpYbalNzM0l36GdWVnmGOyCRQAeYhrhFXGOtqOSVEL WlkEUSt1C2XA/kawDMTQ2vRZMSO875KiopJgT8CGTUrRbkoDj+0tX41bWuj+kJPKjThJyiy9Y14+ 4Dkp9wCf71wDjyXt2NlybVYBnk5m9QBLeI31dXYtrPaxfrkDLezG/4QrqgYOsjtQm5YAv0fQA6eG hpcuNWvPd3QOl/t+4Tv+lnJre0nVJGBVL51hEYRtagDD6uRWUC9MyoyA5HEUBRoozHiuzKQgfnfF BJW/tjjOh2wox5l6f/3C5KaDYLFmoVURwg9hqOshpKd9cpvmLXE+/wPSrVmCZ8bLHQAAACV0RVh0 ZGF0ZTpjcmVhdGUAMjAyMi0wOC0yMVQxMTozNzoxNSswMDowMPQM2RMAAAAldEVYdGRhdGU6bW9k aWZ5ADIwMjItMDgtMjFUMTE6Mzc6MTUrMDA6MDCFUWGvAAAAAElFTkSuQmCC X-Now-Playing: Cirkus Modern's =?utf-8?Q?=5FTr=C3=B8st=5F=3A?= "Krig" Date: Sun, 21 Aug 2022 14:08:17 +0200 Message-ID: <87v8qln6j2.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Gregory Heytings writes: > I can reproduce that, too. The "Narrow" indication disappears with > the next redisplay cycle, so it seems to be a not-too-grave issue (but > a bug nonetheless). Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: Eli Zaretskii , 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Gregory Heytings writes: > I can reproduce that, too. The "Narrow" indication disappears with > the next redisplay cycle, so it seems to be a not-too-grave issue (but > a bug nonetheless). The buffer is actually left in a visually narrowed state -- type something before the (hidden) long line, and bits of the window will become blank until you type something else. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 21 08:42:13 2022 Received: (at 57207) by debbugs.gnu.org; 21 Aug 2022 12:42:13 +0000 Received: from localhost ([127.0.0.1]:34013 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPkHL-0007YK-FA for submit@debbugs.gnu.org; Sun, 21 Aug 2022 08:42:13 -0400 Received: from heytings.org ([95.142.160.155]:34266) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPkHG-0007Y9-Tq for 57207@debbugs.gnu.org; Sun, 21 Aug 2022 08:42:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1661085725; bh=qA9M7RYwEQDWsm2Jf4tU+L/xyrurXkp7MxUQ8y21irs=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=PWtx1wzvhqxQEFMoaDdM96jhWjtDXFlVda7xRSIngJQGrBD6rkBHbleQPbBax4s2F TAZ7V0/SNT/aDPiPfvX/JTKTl2Mgrjad/YhAywxGA4MBfveFSmXnWId+4tZG/DDDpY GodbZ4gBjCezp8CKk7hBRWaGCuzasGvSY7CIQwDvZFuQpMIqvhWHddtT+Pji6Jzygo rZA0oRUTW/Zkcx2pb0N8kKUIHY7CgjmWh5PlBeymFETw66QhVCColsJm6UatteUL+i 9kv2jY0xMIFxl/1XV+yvCutBr/nlCkeSbsYEgPg5ZYeV2R/2rBVdEdWFXK8rzliq3F 8odMsQR9zav7g== Date: Sun, 21 Aug 2022 12:42:05 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <83fshpdctx.fsf@gnu.org> Message-ID: References: <87bksmx1j1.fsf@localhost> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> <37dd2827f52038e95791@heytings.org> <83wnb2ddxd.fsf@gnu.org> <37dd2827f57a3d664931@heytings.org> <37dd2827f52c6a150684@heytings.org> <83tu66cfnr.fsf@gnu.org> <83fshpdctx.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 57207 Cc: larsi@gnus.org, 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > > Is locked narrowing intended to be used only for pre- and post-command > hooks and similar stuff? That is, is it not intended for use from any > other Lisp program? > Stefan said (IIUC) that it could be useful for Lisp programs, so it is now possible to use it anywhere (but the docstring says that it should be done sparingly). > > Also, do we know for sure that only the "outermost" narrowing is > supposed to be reflected on the mode line? > Given how the "outermost" narrowing is calculated (perhaps "outermost" is not the best name, I did not find a better one), yes, I think so. The outermost narrowing is the narrowing before locked narrowing is entered. >> Another way to do it would be to unset and reset the locked narrowing >> for each buffer in the loop inside redisplay_mode_lines, I think. > > Why not in redisplay_internal? > In general I prefer to act on lower levels if possible. But yes, indeed, it could be moved above decode_mode_spec and redisplay_mode_lines, in echo_area_display or redisplay_internal. > > TBH, I'm extremely nervous about forced narrowing in pre- and > post-command hooks. Those hooks can run arbitrary Lisp and assume they > can access the buffer without any unexpected restrictions. I think > applying narrowing here runs afoul of the principle of enforcing the > narrowing in as few places as possible, which IMO is the only way this > technique can avoid breaking too many things. If some package puts on > these hooks stuff that could run awry when long lines are present, I'd > rather we fixed those packages and/or applied narrowing "by hand" in > their hook functions. Since long-line-optimizations-p is now exposed to > Lisp, there should be no difficulty in doing that. > I don't know. As far as I can see it doesn't seem to create many problems, and it will happen only in "too large" buffers anyway. IMO we should just give it a try, it will always be possible to step back if it transpires that the cost is higher than the benefit. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 21 08:47:28 2022 Received: (at 57207) by debbugs.gnu.org; 21 Aug 2022 12:47:28 +0000 Received: from localhost ([127.0.0.1]:34021 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPkMS-0007gl-1c for submit@debbugs.gnu.org; Sun, 21 Aug 2022 08:47:28 -0400 Received: from quimby.gnus.org ([95.216.78.240]:41938) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPkMP-0007gR-PB for 57207@debbugs.gnu.org; Sun, 21 Aug 2022 08:47:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=3+lA/E27cx0cjPTzwg1fAn9kYYbcKYjCLUsibXP4QEk=; b=KDPqi/s+W6A/rrK9aYA8KC4TEq dGR5lOQX+AwG6uohbhtgd6ctMLEfmvMQgmzLiOxDZVM5WqVDXulwdC392i4l2JXoxxj1eUtjr8nKe vSIB5xqdsJX7XvnRgxbqu/eD0PqFUeCD/M+1WRZj/wlLKNtVKPHeWPDPuGMUuOR6CSo4=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oPkMF-0001xd-Rn; Sun, 21 Aug 2022 14:47:17 +0200 From: Lars Ingebrigtsen To: Gregory Heytings Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: (Gregory Heytings's message of "Sun, 21 Aug 2022 12:42:05 +0000") References: <87bksmx1j1.fsf@localhost> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> <37dd2827f52038e95791@heytings.org> <83wnb2ddxd.fsf@gnu.org> <37dd2827f57a3d664931@heytings.org> <37dd2827f52c6a150684@heytings.org> <83tu66cfnr.fsf@gnu.org> <83fshpdctx.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEWdkXFgYltBNSxv gX6urpL////1g5C3AAAAAWJLR0QF+G/pxwAAAAd0SU1FB+YIFQwtKqn11A4AAAGISURBVDjLdZPh kYQgDIXhoAACV4BQAcgWwI70X9O9BHTVc/PDGfKRl5BEpa5GbAn2zT+B/sEZXv8AioB4A1eprzn8 HdBufgJTqLIRhVpD7/09gaYTeF1AGCCAnYEJNbzs9h9o3M6qllCRrB/AKgOgACBW6QDNtgFMgFLN B+i9aZIIgCJFTdAkh6r8naBMYPrGUgBBlDYBrXcGmkYm+BE4cwCQDiajQlwrs1eWQXf8nmb10nUa fUcwcvRsM3RKWt4+0ZAaYHPZKEgsKUUKEmG5qt7IKi8DinGXQqEvPNLhxI7Ic/8AYxw2QULSBSDx mhh4BuUETGBpdt9BphX3JcsH1K6ckWP6Byx6PHLz/sR9tI03hR3k0Ftp1ogA4KctRL8dW/aRyuot b9ZRnkGobYKApoY17T1B3SNHFv4BR47sXMh63TuyV6UwCl6vZ6BOYP8NMDxXz0C6i2kTRyD/FcBB bvxRZW+JSHEnNJ1stlIRPXjvwMdH4GnsyQRjAHL5JCQgzZFeTaUv9gchl3huqTRFngAAACV0RVh0 ZGF0ZTpjcmVhdGUAMjAyMi0wOC0yMVQxMjo0NTo0MiswMDowMOlPQIkAAAAldEVYdGRhdGU6bW9k aWZ5ADIwMjItMDgtMjFUMTI6NDU6NDIrMDA6MDCYEvg1AAAAAElFTkSuQmCC X-Now-Playing: Latin Quarter's _Modern Times_: "Truth About John" Date: Sun, 21 Aug 2022 14:47:15 +0200 Message-ID: <87h725n4q4.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: The [Narrow] mode line problem is gone on the new branch, but the blank-window problem isn't: If you type something before the "foo" bit in the test case, the portion of the window below the foo will [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: Eli Zaretskii , 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) The [Narrow] mode line problem is gone on the new branch, but the blank-window problem isn't: If you type something before the "foo" bit in the test case, the portion of the window below the foo will blank in and out. (Type something below foo first to see the effect.) From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 21 08:53:55 2022 Received: (at 57207) by debbugs.gnu.org; 21 Aug 2022 12:53:55 +0000 Received: from localhost ([127.0.0.1]:34026 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPkSg-0007t3-QG for submit@debbugs.gnu.org; Sun, 21 Aug 2022 08:53:55 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48460) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPkSf-0007sq-7k for 57207@debbugs.gnu.org; Sun, 21 Aug 2022 08:53:53 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43378) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPkSZ-00045F-Sp; Sun, 21 Aug 2022 08:53:47 -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=QkSBejkeerG6DPOsi4odSR5A9lWZ5uwqCBiA+0+bZE0=; b=Grpm6qY4/oHJ AAdhuUCHX0u2zIOyDX3pmYRizRv4Sbmz8pRNgMjQVJLZgagMxLiLgzw/cyqARYb8b/TYJ85ALCyuC Oo0MB144qPjrpS3ColWONSWoEGoReWnn0yCRE5RG4rlURBptiKUrrKSazgmFk4Pg2Nx87AH4wpc2m ZRFzJt9Ydjpsyl1qRwC72n8PyeeuTZUmpcoK1hAAwMDQTLRNcTBTJYXhJEOQpH/5XY3AcVWzKb6HD z1rMXlEzixYsQ+GJ7VvkeJB4Z7YpebpmowvcNiGaYnjiW3Xejp5LLuAFRJrsP3F0HMIjd9raCm0gf p9QRd6Z76J2sr1EZlh2yYg==; Received: from [87.69.77.57] (port=2820 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 1oPkSZ-0001b0-C1; Sun, 21 Aug 2022 08:53:47 -0400 Date: Sun, 21 Aug 2022 15:53:47 +0300 Message-Id: <83bksddag4.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings In-Reply-To: (message from Gregory Heytings on Sun, 21 Aug 2022 12:42:05 +0000) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> <37dd2827f52038e95791@heytings.org> <83wnb2ddxd.fsf@gnu.org> <37dd2827f57a3d664931@heytings.org> <37dd2827f52c6a150684@heytings.org> <83tu66cfnr.fsf@gnu.org> <83fshpdctx.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: larsi@gnus.org, 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sun, 21 Aug 2022 12:42:05 +0000 > From: Gregory Heytings > cc: larsi@gnus.org, 57207@debbugs.gnu.org, yantar92@gmail.com > > > Is locked narrowing intended to be used only for pre- and post-command > > hooks and similar stuff? That is, is it not intended for use from any > > other Lisp program? > > Stefan said (IIUC) that it could be useful for Lisp programs, so it is now > possible to use it anywhere (but the docstring says that it should be done > sparingly). Which means that the code you installed on the branch will "undo" such narrowing done from Lisp as well, doesn't it? That might not be what the Lisp program which did that wanted. > >> Another way to do it would be to unset and reset the locked narrowing > >> for each buffer in the loop inside redisplay_mode_lines, I think. > > > > Why not in redisplay_internal? > > In general I prefer to act on lower levels if possible. But yes, indeed, > it could be moved above decode_mode_spec and redisplay_mode_lines, in > echo_area_display or redisplay_internal. It is better to do that higher, because not only those places in decode_mode_spec may wish to access BEGV and ZV. Even in the mode-line display there are :eval and :when. > > TBH, I'm extremely nervous about forced narrowing in pre- and > > post-command hooks. Those hooks can run arbitrary Lisp and assume they > > can access the buffer without any unexpected restrictions. I think > > applying narrowing here runs afoul of the principle of enforcing the > > narrowing in as few places as possible, which IMO is the only way this > > technique can avoid breaking too many things. If some package puts on > > these hooks stuff that could run awry when long lines are present, I'd > > rather we fixed those packages and/or applied narrowing "by hand" in > > their hook functions. Since long-line-optimizations-p is now exposed to > > Lisp, there should be no difficulty in doing that. > > I don't know. As far as I can see it doesn't seem to create many > problems I fear this is just the tip of the iceberg. > and it will happen only in "too large" buffers anyway. Yes, but these hooks run stuff that doesn't necessarily access buffer text or look far away of the viewport. > IMO we should just give it a try, it will always be possible to step > back if it transpires that the cost is higher than the benefit. That's we are doing. But we could also do it the other way around: fix the places we know are problematic in Lisp, and then wait for enough such problems to appear elsewhere. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 21 09:18:43 2022 Received: (at 57207) by debbugs.gnu.org; 21 Aug 2022 13:18:43 +0000 Received: from localhost ([127.0.0.1]:34066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPkqg-00006F-U6 for submit@debbugs.gnu.org; Sun, 21 Aug 2022 09:18:43 -0400 Received: from heytings.org ([95.142.160.155]:34332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPkqf-000067-Gz for 57207@debbugs.gnu.org; Sun, 21 Aug 2022 09:18:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1661087920; bh=sfe1Gc55j8JOOMBu3+jq4AvVHEl2d2JZszy2lUclLYU=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=BLQzUGNQv1gHsEZK4J8rblC/4aNqRTAxaTEmybmdnh2Aii66psbRErCLmgNCZotEM 7brz6VvG7emGxvEA2V1aDQs0GFaHJd6SbRXlsZNCzPEztFhFttGuTrXPuvQETQYt5f u1RCIBWys3B2c1zbPkRn0cI+3rvM+WXy0pwbQS20FBH2PQOG4bfHZ+6lWUpaPZ6/tl iu8+I+DjnYOHFY5dsvxdPmpwiIqjXQsZMR/uFEW1vbcF3+ltNgHCPvW01d7Un17DDm NVDVztuap5/sIFj8hzeRMFEjZ0aeUqi7nw9PKCm27HWZYLSgs88NA+zzcQZlovt7Oz 86oBhgoJ9CLnA== Date: Sun, 21 Aug 2022 13:18:39 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <83bksddag4.fsf@gnu.org> Message-ID: References: <87bksmx1j1.fsf@localhost> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> <37dd2827f52038e95791@heytings.org> <83wnb2ddxd.fsf@gnu.org> <37dd2827f57a3d664931@heytings.org> <37dd2827f52c6a150684@heytings.org> <83tu66cfnr.fsf@gnu.org> <83fshpdctx.fsf@gnu.org> <83bksddag4.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 57207 Cc: larsi@gnus.org, 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> Stefan said (IIUC) that it could be useful for Lisp programs, so it is >> now possible to use it anywhere (but the docstring says that it should >> be done sparingly). > > Which means that the code you installed on the branch will "undo" such > narrowing done from Lisp as well, doesn't it? That might not be what > the Lisp program which did that wanted. > I'm not sure I understand what you mean. What the modeline should display is the state of the "user" narrowing, not of a narrowing decided by a Lisp function. Changing the user narrowing from inside a hook function cannot be guaranteed to work, as far as I understand, as any other later hook function could change or undo that narrowing. > > It is better to do that higher, because not only those places in > decode_mode_spec may wish to access BEGV and ZV. Even in the mode-line > display there are :eval and :when. > Okay, I'll see what I can do. >> IMO we should just give it a try, it will always be possible to step >> back if it transpires that the cost is higher than the benefit. > > That's we are doing. But we could also do it the other way around: fix > the places we know are problematic in Lisp, and then wait for enough > such problems to appear elsewhere. > Indeed. As I said, I don't know which path is better. My feeling (which could again be wrong) is that the current one is safer from a "responsive Emacs" viewpoint. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 21 09:22:19 2022 Received: (at 57207) by debbugs.gnu.org; 21 Aug 2022 13:22:19 +0000 Received: from localhost ([127.0.0.1]:34077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPkuA-0000D7-Su for submit@debbugs.gnu.org; Sun, 21 Aug 2022 09:22:19 -0400 Received: from heytings.org ([95.142.160.155]:34344) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPku8-0000Cz-JF for 57207@debbugs.gnu.org; Sun, 21 Aug 2022 09:22:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1661088136; bh=faKPLh/lyrynb499YhfNzCqHipgaKag0mE6aFnv3qlI=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=wjTbdgSWtZz1Mx5o4SIDHyW0om/HtXiWQDchopevnesu6+/T46oKINQonDLB5/dEp Q6vUgjCpySJmuaMROliWBuakzK0HiL881G1LCzzZDhFGxLhcUhSszheKbBZh11DHlR o/a/2qYVDTfOI8adDlDleLFvWZUmJ97BUUGs/Vd6C1IRmxCSf8MVzhEUWbhuFXecbP MKWtNRb0nlNi5SyzWneEnwVS2Z704EGUK6kY9a9VwcM7Hm3K5NhVmnS6LHE+VeWHA7 NzOAO5HzzxY0AUsCbFsZ1b53JHWYdc7XyL0ZNfAyj6ZDLBp3ieYT8iqceIMm/hDkMU d6E6GG90jSMOw== Date: Sun, 21 Aug 2022 13:22:15 +0000 From: Gregory Heytings To: Lars Ingebrigtsen Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <87h725n4q4.fsf@gnus.org> Message-ID: References: <87bksmx1j1.fsf@localhost> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> <37dd2827f52038e95791@heytings.org> <83wnb2ddxd.fsf@gnu.org> <37dd2827f57a3d664931@heytings.org> <37dd2827f52c6a150684@heytings.org> <83tu66cfnr.fsf@gnu.org> <83fshpdctx.fsf@gnu.org> <87h725n4q4.fsf@gnus.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 57207 Cc: Eli Zaretskii , 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > > The [Narrow] mode line problem is gone on the new branch, but the > blank-window problem isn't: If you type something before the "foo" bit > in the test case, the portion of the window below the foo will blank in > and out. (Type something below foo first to see the effect.) > I cannot reproduce that here: after evalling the recipe, typing "bar" and then doing M-< bar works as expected. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 21 09:24:13 2022 Received: (at 57207) by debbugs.gnu.org; 21 Aug 2022 13:24:13 +0000 Received: from localhost ([127.0.0.1]:34082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPkw1-0000GB-9w for submit@debbugs.gnu.org; Sun, 21 Aug 2022 09:24:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47358) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPkw0-0000Fx-6N for 57207@debbugs.gnu.org; Sun, 21 Aug 2022 09:24:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56180) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPkvu-0008UH-Vx; Sun, 21 Aug 2022 09:24:06 -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=Rs1RTR9PcJatemGqSXqorfC8BILRtbWjbEQbFFfcnwE=; b=IkNpIHXrn+n6 qUwnDXw44VMp+Z6Gl0M0WObI4+hdSu8o17EKET5PPdY5KfGvSeKx0DYL/ih8NNXvQoJawB/VB6Vqm GGnVcxBjr6+voHfbr1BgC/CuOwT+6FoeOrsolJP8B1h7jYZtjeVoZh15NFY9WcGQ/5H6irO3lmEh5 xW1RZu4N5VBRwjh6OYzzTOMGmcURoouJppfa/gN+9S4UAFP3ZcwRwE/7UgTPSBr9PBtyO7QvUYfUC 0gE792FKdy/FQs9m9iIB9ne/iFal0Us2g4VgpR0qorOVLYnv3nUc6+inZgIjL0sPqC/CEzS8ognlx CE7SShWvmtcp93ffdp6xnw==; Received: from [87.69.77.57] (port=4679 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 1oPkvu-0000CQ-Dt; Sun, 21 Aug 2022 09:24:06 -0400 Date: Sun, 21 Aug 2022 16:24:08 +0300 Message-Id: <835yild91j.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings In-Reply-To: (message from Gregory Heytings on Sun, 21 Aug 2022 13:18:39 +0000) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> <37dd2827f52038e95791@heytings.org> <83wnb2ddxd.fsf@gnu.org> <37dd2827f57a3d664931@heytings.org> <37dd2827f52c6a150684@heytings.org> <83tu66cfnr.fsf@gnu.org> <83fshpdctx.fsf@gnu.org> <83bksddag4.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: larsi@gnus.org, 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sun, 21 Aug 2022 13:18:39 +0000 > From: Gregory Heytings > cc: larsi@gnus.org, 57207@debbugs.gnu.org, yantar92@gmail.com > > >> Stefan said (IIUC) that it could be useful for Lisp programs, so it is > >> now possible to use it anywhere (but the docstring says that it should > >> be done sparingly). > > > > Which means that the code you installed on the branch will "undo" such > > narrowing done from Lisp as well, doesn't it? That might not be what > > the Lisp program which did that wanted. > > I'm not sure I understand what you mean. What the modeline should display > is the state of the "user" narrowing, not of a narrowing decided by a Lisp > function. We don't currently discern between these two, so some Lisp program could use this locked narrowing expecting to see it on the modeline. If that is not supposed to happen and/or is unsupported, we should at least document it. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 21 09:27:49 2022 Received: (at 57207) by debbugs.gnu.org; 21 Aug 2022 13:27:49 +0000 Received: from localhost ([127.0.0.1]:34087 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPkzU-0000Km-V0 for submit@debbugs.gnu.org; Sun, 21 Aug 2022 09:27:49 -0400 Received: from quimby.gnus.org ([95.216.78.240]:42250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPkzS-0000KY-KT for 57207@debbugs.gnu.org; Sun, 21 Aug 2022 09:27:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=b0Imf49xl1dZTAw79tZ2ZlClFC3MxWVfNWUkCkW3rCM=; b=D2H61DAMVNz2wCdMDeMpXtxNCV jbKgUS+RDYnhE1gHUmRi1eMy3IzvI+oHz9VF9waFT3DCXtL/7GHwlkuBnUoeNHrW0lYuVHLK9wwor odZwTg/vICTSj2b9gC4BFK8lmUC8LTk3wyjkgK6nz8VNORSAx+aV352oH23LsnV9Fztk=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oPkzJ-0002Ka-5D; Sun, 21 Aug 2022 15:27:39 +0200 From: Lars Ingebrigtsen To: Gregory Heytings Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: (Gregory Heytings's message of "Sun, 21 Aug 2022 13:22:15 +0000") References: <87bksmx1j1.fsf@localhost> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> <37dd2827f52038e95791@heytings.org> <83wnb2ddxd.fsf@gnu.org> <37dd2827f57a3d664931@heytings.org> <37dd2827f52c6a150684@heytings.org> <83tu66cfnr.fsf@gnu.org> <83fshpdctx.fsf@gnu.org> <87h725n4q4.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEUGBgVfVEGxppL/ //9ztTv8AAAAAWJLR0QDEQxM8gAAAAlwSFlzAAAuGAAALhgBKqonIAAAAAd0SU1FB+YIFQ0aNbU4 E/gAAAFWSURBVCjPVdJBb4IwFAfwV1LI5MQSMZPzdnCfoiZsyW5oWjM47aCL8Cn8CC6RRT15oIb2 U659UHFc6C8t/9e+AvDvYT6/jb0m0MwhaEDvHEJF5P4GvZK1W5fI5fWUOaiV4g40FoSPgTQoiwy8 1o6JzKTITCimbYPSltMY0CQfA1g1Mt8DIpzmoxxedohAFuoNxrLCtHouCHuaIoBDTIDSHtGamhfW CVQh7dbaLjpZ23fT4RXP9oUgpckAcsGieZFzbAV2x5MGYevqmDRyZR18u+Da4OEmJz+FoDybKU/O NU+jkfo1FUJJzpBGU1VfbBPfFfhRro5re96FFqZhZftsm7jUNaPRTJmZcCPkgkGWWJgm/gjEAQEG +1hbCE5ERtijPuJ2IAXCYv3Z3URmMK627v4Io1V5A9DyNOBho+5mmtnwo/h1eIdDMGDCvvtRZNBd V78MCvgDE8FdXnGbZBAAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjItMDgtMjFUMTM6MjY6NTMrMDA6 MDBdhuNmAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIyLTA4LTIxVDEzOjI2OjUzKzAwOjAwLNtb2gAA AABJRU5ErkJggg== X-Now-Playing: Secs's _Doer_: "Runt God Arranged by Dan Deacon" Date: Sun, 21 Aug 2022 15:27:36 +0200 Message-ID: <874jy5n2uv.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Gregory Heytings writes: > I cannot reproduce that here: after evalling the recipe, typing "bar" > and then doing M-< bar works as expected. Here's a full test case. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: Eli Zaretskii , 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Gregory Heytings writes: > I cannot reproduce that here: after evalling the recipe, typing "bar" > and then doing M-< bar works as expected. Here's a full test case. emacs -Q and then: (progn (pop-to-buffer "foo.txt") (flyspell-mode) (insert "\n\n" (propertize (make-string 20000 ?x) 'display "foo") "\n\nbar\nzot\n") (goto-char (point-min))) Then type `d'. Everything after "foo" disappears. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 21 09:32:20 2022 Received: (at 57207) by debbugs.gnu.org; 21 Aug 2022 13:32:20 +0000 Received: from localhost ([127.0.0.1]:34094 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPl3r-0000Si-S4 for submit@debbugs.gnu.org; Sun, 21 Aug 2022 09:32:20 -0400 Received: from heytings.org ([95.142.160.155]:34372) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPl3p-0000SZ-Lt for 57207@debbugs.gnu.org; Sun, 21 Aug 2022 09:32:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1661088737; bh=93Em8R6xr/qlZdI60sshAGhJ8uh+UxP7wpIA/qiPjfg=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=INDiZqquzTXYDY2Qkt20Gmtbe2W6ukFGDsj3ZNWqjZ4EuYAGjRKwVI/jqPRHRuu5X PuHp4XwyqSMTNBBldoFTxsbba4gTYfI+KZ4DcinMGkUn87NKpKmQoqv8i/ciwbV9nq XBtE4Kt8fCgukuM/k79eFa6UId32ioly0lHdgyhtpnvBrd/dC9pKJzQL+WsMC+iMA9 6/4q7VrtS2z+tVps0jwz7KHJnd/S91M3n7pDxdmk3lO45aQUGJPS0Y22WIbjes5IeT Wk4hj2I0TM0+BRAXAkoQWkGJPVmXhD0/H1PH8BMe3VuFQ8LHwHaCVEaDb4Thp815QE 1csdFLmcmVIlQ== Date: Sun, 21 Aug 2022 13:32:16 +0000 From: Gregory Heytings To: Lars Ingebrigtsen Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <874jy5n2uv.fsf@gnus.org> Message-ID: References: <87bksmx1j1.fsf@localhost> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> <37dd2827f52038e95791@heytings.org> <83wnb2ddxd.fsf@gnu.org> <37dd2827f57a3d664931@heytings.org> <37dd2827f52c6a150684@heytings.org> <83tu66cfnr.fsf@gnu.org> <83fshpdctx.fsf@gnu.org> <87h725n4q4.fsf@gnus.org> <874jy5n2uv.fsf@gnus.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 57207 Cc: Eli Zaretskii , 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > > Here's a full test case. > Thanks! > > emacs -Q and then: > > (progn > (pop-to-buffer "foo.txt") > (flyspell-mode) > (insert "\n\n" > (propertize (make-string 20000 ?x) 'display "foo") > "\n\nbar\nzot\n") > (goto-char (point-min))) > > Then type `d'. Everything after "foo" disappears. > It doesn't, here :( Strange... From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 21 09:37:14 2022 Received: (at 57207) by debbugs.gnu.org; 21 Aug 2022 13:37:14 +0000 Received: from localhost ([127.0.0.1]:34098 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPl8c-0000Zl-Iu for submit@debbugs.gnu.org; Sun, 21 Aug 2022 09:37:14 -0400 Received: from quimby.gnus.org ([95.216.78.240]:42436) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPl8Z-0000ZX-QJ for 57207@debbugs.gnu.org; Sun, 21 Aug 2022 09:37:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=UOkmiUpkbon5ksVHynjrOYoO+hn8bl3WtER09gKDoRk=; b=Lh0+/FJZyVThtHy3BgmJwsdehL wUkGJKeuo5YT5TatYelbC7Qm3plPS1AfujYvzd4btr49DVp3tmCFB6zF1Vx6G9OiE5LalHVrnVzjR PtkyQZxndQeG5LtFe2AkgQ2R74VnGbmEITrNGikwn5pZs39/P65tEDNhFH+Ikbnk29PA=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oPl8R-0002Pv-0t; Sun, 21 Aug 2022 15:37:05 +0200 From: Lars Ingebrigtsen To: Gregory Heytings Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: (Gregory Heytings's message of "Sun, 21 Aug 2022 13:32:16 +0000") References: <87bksmx1j1.fsf@localhost> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> <37dd2827f52038e95791@heytings.org> <83wnb2ddxd.fsf@gnu.org> <37dd2827f57a3d664931@heytings.org> <37dd2827f52c6a150684@heytings.org> <83tu66cfnr.fsf@gnu.org> <83fshpdctx.fsf@gnu.org> <87h725n4q4.fsf@gnus.org> <874jy5n2uv.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEUGBgVfVEGxppL/ //9ztTv8AAAAAWJLR0QDEQxM8gAAAAlwSFlzAAAuGAAALhgBKqonIAAAAAd0SU1FB+YIFQ0aNbU4 E/gAAAFWSURBVCjPVdJBb4IwFAfwV1LI5MQSMZPzdnCfoiZsyW5oWjM47aCL8Cn8CC6RRT15oIb2 U659UHFc6C8t/9e+AvDvYT6/jb0m0MwhaEDvHEJF5P4GvZK1W5fI5fWUOaiV4g40FoSPgTQoiwy8 1o6JzKTITCimbYPSltMY0CQfA1g1Mt8DIpzmoxxedohAFuoNxrLCtHouCHuaIoBDTIDSHtGamhfW CVQh7dbaLjpZ23fT4RXP9oUgpckAcsGieZFzbAV2x5MGYevqmDRyZR18u+Da4OEmJz+FoDybKU/O NU+jkfo1FUJJzpBGU1VfbBPfFfhRro5re96FFqZhZftsm7jUNaPRTJmZcCPkgkGWWJgm/gjEAQEG +1hbCE5ERtijPuJ2IAXCYv3Z3URmMK627v4Io1V5A9DyNOBho+5mmtnwo/h1eIdDMGDCvvtRZNBd V78MCvgDE8FdXnGbZBAAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjItMDgtMjFUMTM6MjY6NTMrMDA6 MDBdhuNmAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIyLTA4LTIxVDEzOjI2OjUzKzAwOjAwLNtb2gAA AABJRU5ErkJggg== X-Now-Playing: Secs's _Doer_: "Wormy Alice Featuring 83 Cutlass" Date: Sun, 21 Aug 2022 15:37:02 +0200 Message-ID: <87v8qllnup.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Gregory Heytings writes: >> (flyspell-mode) >> (insert "\n\n" >> (propertize (make-string 20000 ?x) 'display "foo") >> "\n\nbar\nzot\n") >> (goto-char (point-min))) >> >> Then type `d'. Everything after "foo" disappears. >> > [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: Eli Zaretskii , 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Gregory Heytings writes: >> (flyspell-mode) >> (insert "\n\n" >> (propertize (make-string 20000 ?x) 'display "foo") >> "\n\nbar\nzot\n") >> (goto-char (point-min))) >> >> Then type `d'. Everything after "foo" disappears. >> > > It doesn't, here :( Strange... Does flyspell-mode actually work for you, then? Try `M-x flyspell-mode' in "emacs -Q" and see what happens. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 21 09:39:02 2022 Received: (at 57207) by debbugs.gnu.org; 21 Aug 2022 13:39:02 +0000 Received: from localhost ([127.0.0.1]:34102 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPlAL-0000cV-UR for submit@debbugs.gnu.org; Sun, 21 Aug 2022 09:39:02 -0400 Received: from heytings.org ([95.142.160.155]:34404) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPlAK-0000c6-Ju for 57207@debbugs.gnu.org; Sun, 21 Aug 2022 09:39:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1661089138; bh=lH8RisUiIe5HBG5o0bZStnw0JuaMDznxlKBBw61fzVs=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=fXkV01Q4jqsL3Z3j8D4F8PLtGd06TL1lmYj2Pq/2ZAPMgp/SIydv+ee9S5YQQuYpU Hr0y4jvTsQ31PKRtDKjtqyCShcxB7KokOWuhvvjev/WAz74QeAuojp3f8HjWL0ziBz 5hb1J5FsKIdSK45F/nc4YIYiP+1iHMQe9JEDbA6+CAMggwBEIL5n8d7JVZvBjVUNSS aAQtpt7SOIAUUog8gi+I/VGW4O4Z1cIb/DGz74lQVvkVJ1YaQqujAwe2xYWY/6pY7P qpHh3lRdLmbQyhVVzZCCkJkEoVouTGwvTWgnlRmwWNMs/Scn6AlWacSnXl3zVtPb6L DUt/fJzYduGPA== Date: Sun, 21 Aug 2022 13:38:58 +0000 From: Gregory Heytings To: Lars Ingebrigtsen Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: Message-ID: References: <87bksmx1j1.fsf@localhost> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> <37dd2827f52038e95791@heytings.org> <83wnb2ddxd.fsf@gnu.org> <37dd2827f57a3d664931@heytings.org> <37dd2827f52c6a150684@heytings.org> <83tu66cfnr.fsf@gnu.org> <83fshpdctx.fsf@gnu.org> <87h725n4q4.fsf@gnus.org> <874jy5n2uv.fsf@gnus.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 57207 Cc: Eli Zaretskii , 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> emacs -Q and then: >> >> (progn >> (pop-to-buffer "foo.txt") >> (flyspell-mode) >> (insert "\n\n" >> (propertize (make-string 20000 ?x) 'display "foo") >> "\n\nbar\nzot\n") >> (goto-char (point-min))) >> >> Then type `d'. Everything after "foo" disappears. > > It doesn't, here :( Strange... > Wait... now it does! Thanks! From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 21 09:39:58 2022 Received: (at 57207) by debbugs.gnu.org; 21 Aug 2022 13:39:58 +0000 Received: from localhost ([127.0.0.1]:34113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPlBG-0000eB-30 for submit@debbugs.gnu.org; Sun, 21 Aug 2022 09:39:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37456) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPlBD-0000dx-Os for 57207@debbugs.gnu.org; Sun, 21 Aug 2022 09:39:56 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55148) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPlB8-0002LZ-Cr; Sun, 21 Aug 2022 09:39:50 -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=2tTEA2ZqaqZVMH9AM+vuaIKEPIHcqXHueWXKEWhmBcY=; b=dk7EV8nFDHWW R++GpD11wRf07K34ACnCxT2MOf6IlqtNlMPS1ynB4oc0sioyJpH1r38QF4ZhfwAcMejvhWUQ+qaBi +6AQ6WUbuaqMkqJQJihQHvP4DmErd0kCVEACJgxwslJ2C8VM9qmRq6efVvO7Vn1PfVZKgnb0dPhiT +zsTMgB0CphFrmjK8NwnRh9hGbSrFcuWZYGVtX7usZgu1kYcDxFumX7u2rpQiVNYebdbnOmRtNXIp wHyC/vtv+qmSUdXaCQqoraxjbi1thkjiGv4Fm0KngMPwdl8g9s+MW+HIsAKrzDo+xlDgFJbLRkDKu yDy7Z1XHWGxogwjWmNEoHA==; Received: from [87.69.77.57] (port=1667 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 1oPlB7-0005me-TI; Sun, 21 Aug 2022 09:39:50 -0400 Date: Sun, 21 Aug 2022 16:39:52 +0300 Message-Id: <8335dpd8bb.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings In-Reply-To: (message from Gregory Heytings on Sun, 21 Aug 2022 13:32:16 +0000) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> <37dd2827f52038e95791@heytings.org> <83wnb2ddxd.fsf@gnu.org> <37dd2827f57a3d664931@heytings.org> <37dd2827f52c6a150684@heytings.org> <83tu66cfnr.fsf@gnu.org> <83fshpdctx.fsf@gnu.org> <87h725n4q4.fsf@gnus.org> <874jy5n2uv.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: larsi@gnus.org, 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sun, 21 Aug 2022 13:32:16 +0000 > From: Gregory Heytings > cc: Eli Zaretskii , 57207@debbugs.gnu.org, yantar92@gmail.com > > > > > > Here's a full test case. > > > > Thanks! > > > > > emacs -Q and then: > > > > (progn > > (pop-to-buffer "foo.txt") > > (flyspell-mode) > > (insert "\n\n" > > (propertize (make-string 20000 ?x) 'display "foo") > > "\n\nbar\nzot\n") > > (goto-char (point-min))) > > > > Then type `d'. Everything after "foo" disappears. > > > > It doesn't, here :( Strange... It does here. Btw, one more aspect of narrowing in safe_run_hooks_maybe_narrowed is that the clip_changed flag of the current buffer is set, which means any calls to 'redisplay' inside the hook will cause the display engine to work harder. If we temporarily restore the narrowing in redisplay_internal, we may wish to undo that, but doing so will only be possible if we save the original state of the flag, before narrow-to-region inside safe_run_hooks_maybe_narrowed, in the outermost-narrowing value, or something like that. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 21 09:42:33 2022 Received: (at 57207) by debbugs.gnu.org; 21 Aug 2022 13:42:34 +0000 Received: from localhost ([127.0.0.1]:34121 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPlDl-0000ir-Jx for submit@debbugs.gnu.org; Sun, 21 Aug 2022 09:42:33 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPlDk-0000ie-1S for 57207@debbugs.gnu.org; Sun, 21 Aug 2022 09:42:32 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55840) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPlDe-0002o5-QT; Sun, 21 Aug 2022 09:42:26 -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=oyqf5Y2l8rxW7+2w5/ZdfpQ0kayYDyYocvivelf49CA=; b=bsrNCaMTEaQe D20B1KRWh+sxQM4WTld2yTXCZQ+K3bmQ/FAiTAVrSWkH2e6vXdYSgQKszlOjyEF1RUEgY46g1jsBQ cxAeULZQqyrFZEj/1KwFuldnsfgzIIzhlNVMLzO2ZeyzX1Iq19/nTHH/KrrRuGEcuNbyK79Ahlz64 BFn2/o5Se8dhC2bhdyeWf0NVEAT5WwEv8jTrB6KuCtEOQlUzLEJHIozLGbstJFPRNZEcU2ukqH85v yBd8dPeVc4NwHwwf8LfAuK0SbsVoZiNzf43BnpFurDfm5FWbQIJPArmc4llvU6fIt2U2lB10/H9R0 QqBYeChimOrH/KrJkTQ/iA==; Received: from [87.69.77.57] (port=1830 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 1oPlDe-000667-4u; Sun, 21 Aug 2022 09:42:26 -0400 Date: Sun, 21 Aug 2022 16:42:28 +0300 Message-Id: <831qt9d86z.fsf@gnu.org> From: Eli Zaretskii To: Lars Ingebrigtsen In-Reply-To: <87v8qllnup.fsf@gnus.org> (message from Lars Ingebrigtsen on Sun, 21 Aug 2022 15:37:02 +0200) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> <37dd2827f52038e95791@heytings.org> <83wnb2ddxd.fsf@gnu.org> <37dd2827f57a3d664931@heytings.org> <37dd2827f52c6a150684@heytings.org> <83tu66cfnr.fsf@gnu.org> <83fshpdctx.fsf@gnu.org> <87h725n4q4.fsf@gnus.org> <874jy5n2uv.fsf@gnus.org> <87v8qllnup.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: gregory@heytings.org, 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: Eli Zaretskii , 57207@debbugs.gnu.org, yantar92@gmail.com > Date: Sun, 21 Aug 2022 15:37:02 +0200 > > Gregory Heytings writes: > > >> (flyspell-mode) > >> (insert "\n\n" > >> (propertize (make-string 20000 ?x) 'display "foo") > >> "\n\nbar\nzot\n") > >> (goto-char (point-min))) > >> > >> Then type `d'. Everything after "foo" disappears. > >> > > > > It doesn't, here :( Strange... > > Does flyspell-mode actually work for you, then? Try `M-x flyspell-mode' > in "emacs -Q" and see what happens. On my system, I need to toggle flyspell-mode twice in the foo.txt buffer, before I can see the issue, because the original invocation of it, as part of the recipe, errors out, and the post-command-hook isn't installed. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 21 15:38:14 2022 Received: (at 57207) by debbugs.gnu.org; 21 Aug 2022 19:38:15 +0000 Received: from localhost ([127.0.0.1]:36841 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPqly-0000EP-L1 for submit@debbugs.gnu.org; Sun, 21 Aug 2022 15:38:14 -0400 Received: from heytings.org ([95.142.160.155]:34910) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPqlw-0000EA-HH for 57207@debbugs.gnu.org; Sun, 21 Aug 2022 15:38:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1661110691; bh=0gtaPVUP9ZY/eZw5WYJFWxNTdVeiahzgi4FlMElw4+U=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=hmtVqvzaUmxA8djDRZy062pQ3m2plhw3C/ucaJhUyS2Quq7ijKAq+nRPpezS6aBxt L3kMEPCi1P2iIOFfr8vUpx0Zn/kNKKwyIgyyLgPAcMqUvQ5MNqnY22hts+DJ4aut88 ApT+FCELAawAsvo8cAnp/c6PSdRH27ZruddqW5H8snEx4LNxN4WCITEJX51JqPVB7Z Ir9Lzb39idkI1Kipv46afuyFOZa6wzhltu1Zd15Zudld8ydYbgVy8R1KEvtUcLMnbK 8U6z5Ma8x2179rxz08GLmtKj8vD0F1oxjhRz9XCid3rptlHAMiu2zuJlgOHEjXsewk TIxI3kO9cYVUw== Date: Sun, 21 Aug 2022 19:38:11 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: Message-ID: References: <87bksmx1j1.fsf@localhost> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> <37dd2827f52038e95791@heytings.org> <83wnb2ddxd.fsf@gnu.org> <37dd2827f57a3d664931@heytings.org> <37dd2827f52c6a150684@heytings.org> <83tu66cfnr.fsf@gnu.org> <83fshpdctx.fsf@gnu.org> <83bksddag4.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 57207 Cc: larsi@gnus.org, 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> It is better to do that higher, because not only those places in >> decode_mode_spec may wish to access BEGV and ZV. Even in the mode-line >> display there are :eval and :when. > > Okay, I'll see what I can do. > Now done in the feature branch, together with a few other improvements. Both Lars' recipes now work as expected. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 21 16:47:53 2022 Received: (at 57207) by debbugs.gnu.org; 21 Aug 2022 20:47:53 +0000 Received: from localhost ([127.0.0.1]:36942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPrrN-0006KH-47 for submit@debbugs.gnu.org; Sun, 21 Aug 2022 16:47:53 -0400 Received: from quimby.gnus.org ([95.216.78.240]:46278) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPrrK-0006JU-WA for 57207@debbugs.gnu.org; Sun, 21 Aug 2022 16:47:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Oijzo82spPhpWWsJ8YdD2n+H+pT176ZXwzJFTycv2EM=; b=NRgXut0SJSf8vbC0+z5vsnvwMX bcN1pRJ3iaT+Q3ShMO3BO145YOwcObIfRGXtCk3PobCcaFjV28QWiPz7LWVCZxb32v/z/MAZzvPgN NsmuMVNQ8u3Rzs/NU6HkbCHPXc+ftB8W7aFARxxvg1AuRmXij2Imk8X8A9Jb4xPO56G0=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oPrrC-0005yh-8L; Sun, 21 Aug 2022 22:47:44 +0200 From: Lars Ingebrigtsen To: Gregory Heytings Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: (Gregory Heytings's message of "Sun, 21 Aug 2022 19:38:11 +0000") References: <87bksmx1j1.fsf@localhost> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> <37dd2827f52038e95791@heytings.org> <83wnb2ddxd.fsf@gnu.org> <37dd2827f57a3d664931@heytings.org> <37dd2827f52c6a150684@heytings.org> <83tu66cfnr.fsf@gnu.org> <83fshpdctx.fsf@gnu.org> <83bksddag4.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEU9Jj2zUD/It4H/ //88qCnUAAAAAWJLR0QDEQxM8gAAAAlwSFlzAAAOwwAADsMBx2+oZAAAAAd0SU1FB+YIFRQvF9Ge CFUAAAFlSURBVCjPfdGxTsMwEAbgC2oQ6gSIMGSCsXmKpiILU4ryW2r2DvVThKF7K+FK7VSkpsL/ U3J2CmLCQ+RP5/M5dyL/rVEiD79IRjKVLO7C57ZMkP6E6qTCdDTVXZom87RCPYoBBUxfy20A4JeL vi5jZIl9wJBu0B7OqwHXjGv6F0OVMenMyg+RZ9IbsvsK6Ar2hl/iI3K60h5lEs9lbBJ2MtGsK8k2 tUxqyQO6DDBVI4WWvWK2sMZBGLGG7TMwYMx1SWJAQeO0LOwFO33apuBc4c1ZMS+4VZz0YdwjD8hP mqs5Y/aKD81lj9eI97/YotXfu8BBb0DzyqPI4xZoHZrrgMzpU3bAjBuFV+CClHB25/RYF+Cwal09 Dm1MtEYFSB5hT5grGFtlP1OgQaipQ/BNUyWGHzr3e+Mh5YF8UdwZ3261C+e3AEsbRuJnIjdPXFlP HhZxJksTh7Uf+h6ht8TJtzGyFPkG4niwgZ4ayZQAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjItMDgt MjFUMjA6NDc6MjMrMDA6MDCRnwIXAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIyLTA4LTIxVDIwOjQ3 OjIzKzAwOjAw4MK6qwAAAABJRU5ErkJggg== X-Now-Playing: The Ascension Plan's _LIVE @ the Minack_: "Buoy (with Mimi Goese)" Date: Sun, 21 Aug 2022 22:47:41 +0200 Message-ID: <87v8ql8gsy.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Gregory Heytings writes: > Now done in the feature branch, together with a few other improvements. > > Both Lars' recipes now work as expected. I can confirm that this fixes these glitches; thanks. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: Eli Zaretskii , 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Gregory Heytings writes: > Now done in the feature branch, together with a few other improvements. > > Both Lars' recipes now work as expected. I can confirm that this fixes these glitches; thanks. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 21 22:30:11 2022 Received: (at 57207) by debbugs.gnu.org; 22 Aug 2022 02:30:11 +0000 Received: from localhost ([127.0.0.1]:37222 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPxCd-0000Rv-FG for submit@debbugs.gnu.org; Sun, 21 Aug 2022 22:30:11 -0400 Received: from mail-pl1-f175.google.com ([209.85.214.175]:45853) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPxCb-0000Qa-33 for 57207@debbugs.gnu.org; Sun, 21 Aug 2022 22:30:10 -0400 Received: by mail-pl1-f175.google.com with SMTP id u22so8670763plq.12 for <57207@debbugs.gnu.org>; Sun, 21 Aug 2022 19:30:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc; bh=9fWU0bIEUfyQidcZqFxQXtZlWWWr9uEM9bh4tw/cmo0=; b=WaLdhHwZIjb2TnhlYMmfM+ozuOB3FepmM79oGrBwwTf7IVt5K++yEHngL1/WmS8CA9 u56Pn9w5Fq7qp85EDcoTU5BlU43Dsl/zlxPT+JdM7WPcUehoUwVc68EIDP4JgFUj5fei v2Yu57su1ifivUbyzHKP+vJK2kd02Xgu+tgt6WgL8IExYr2bTZw5wil2n1SiTNux5x+Y WXFKSvfB89Iw8NbwWgYjFVzf3HPjmj1HNJHu78c/R2gS1alCZ8eIkeV9GVXVOtEMsfbn /lUCviGRTqF+ocBCVRkZVyzOg8bA0OeyeGyzfg6TxraHgBEDGG5Nycplk7YlhCj+XfSe Su4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc; bh=9fWU0bIEUfyQidcZqFxQXtZlWWWr9uEM9bh4tw/cmo0=; b=hePhRDnMrqHJ8dFx2Fi9ysXdVtsWUhPf+SeEBmbI0GQ/a0akN8yx3iYyk5GNTSzO6g WJ3Bijr9tYkaJNanYSsEgGF+UsI5JdK1mj62YIEicdrwXWCigdp351jysbfe4mPpD6Hx FX/vgMdJnvGXy0sZIEB/w2I0f4jrYFFsBaYtnyH6ngyyCXLDLgCXBSgPKR6de4Zwvq8z 9i+LTdRdFZHbQUytzU99LMYL2KWF3TQ6UQF7KbEyb61evMS2c3OFd4pJTCXvQTgczww7 Mv+uF/ogkNS/rITTLH68wojLhPkbltucFH9JBgdwvetdDbuAnVc0SStSBJ1QDVXpMOIs bpow== X-Gm-Message-State: ACgBeo3bKaSY68LMOw/sjjec59gwbgfAphE3uNNaiBYx3/cUh4DC9HpV ERUeTQP+dC9jg8cMiZWh0NY= X-Google-Smtp-Source: AA6agR6lPRyPqkYSCS8ecaBAcFdzpTA2MTv8ACb8AcE0MLb/VoIGQle1G7dcOzmL0Fraq7VUDisdvA== X-Received: by 2002:a17:90b:1e0a:b0:1f5:6554:d502 with SMTP id pg10-20020a17090b1e0a00b001f56554d502mr20139475pjb.101.1661135400153; Sun, 21 Aug 2022 19:30:00 -0700 (PDT) Received: from localhost ([115.154.175.57]) by smtp.gmail.com with ESMTPSA id m3-20020a170902d18300b0016f02fceff4sm7067599plb.57.2022.08.21.19.29.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Aug 2022 19:29:59 -0700 (PDT) From: Ihor Radchenko To: Gregory Heytings Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <83bksmka08.fsf@gnu.org> <325f95fd2b7c0cc80613@heytings.org> <83y1voflmb.fsf@gnu.org> <325f95fd2bce114fd74d@heytings.org> <87r11g1ieu.fsf@localhost> <325f95fd2b82a19f6838@heytings.org> <37dd2827f539d0de2773@heytings.org> <87bksemg5g.fsf@localhost> Date: Mon, 22 Aug 2022 10:31:05 +0800 Message-ID: <87k071ko0m.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 57207 Cc: Eli Zaretskii , 57207@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Gregory Heytings writes: >>> Ihor, any chance that you could try the patch (which I attach again to >>> this post) and tell us if if solves your original problem, namely >>> fontification that is slowed down in large Org files? >> >> The patch does not appear to apply onto current master. >> > > It does here (at 8d4789c072), both with "git apply" and "patch -p1". Are > you sure you're really on the master branch, without local modifications > in src/buffer.h and src/xdisp.c? git apply did not work on my side. patch -p1 worked, though complained about converting newlines. The patch appears to solve the problem. I do not see the slowness any more. Initial fontification got a lot faster as well. Thanks! -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92 From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 22 08:32:54 2022 Received: (at 57207) by debbugs.gnu.org; 22 Aug 2022 12:32:54 +0000 Received: from localhost ([127.0.0.1]:38264 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQ6bt-0004au-Lw for submit@debbugs.gnu.org; Mon, 22 Aug 2022 08:32:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35600) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQ6bq-0004ag-1h for 57207@debbugs.gnu.org; Mon, 22 Aug 2022 08:32:52 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53044) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQ6bj-00010T-PV; Mon, 22 Aug 2022 08:32:43 -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=sPLMNVedtaNXB6lzxWTw0gFrPQj/CgSuzorkkdf/goA=; b=r+rPfuB80zBb e691tQGxYDDB2XucmGXzTUEV/jVHxdVoIUta8YNZBBb3479Qy9C1AQB3/xfgKQIxwDnmmC478itmQ NpHNzj4GD1jtNOCynDdQmfM+ZwOR/r27Q0mTqN2poNqrObBr9EgiriYso5DRd3RB/6LMFHMYMTwbK hfdSCFBAq3HihuUTe0AWRx8HieIIS1LJEqJUi/yMDiXoJNPi3J1vGXPSoNWKT51JrJhfn306UKWWA 0PDOh/zYejaUlyGzNwHTFsfkDZwohxoMyyavyrd88R4cDQYlLbRp7g8O9VEEXhm2R8uwX9tKBRhTi cmtT8PYa0g1Ygl8ljnEt2g==; Received: from [87.69.77.57] (port=2408 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 1oQ6bj-0003dR-4b; Mon, 22 Aug 2022 08:32:43 -0400 Date: Mon, 22 Aug 2022 15:32:46 +0300 Message-Id: <8335dobgr5.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings In-Reply-To: (message from Gregory Heytings on Sun, 21 Aug 2022 19:38:11 +0000) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> <37dd2827f52038e95791@heytings.org> <83wnb2ddxd.fsf@gnu.org> <37dd2827f57a3d664931@heytings.org> <37dd2827f52c6a150684@heytings.org> <83tu66cfnr.fsf@gnu.org> <83fshpdctx.fsf@gnu.org> <83bksddag4.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: larsi@gnus.org, 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sun, 21 Aug 2022 19:38:11 +0000 > From: Gregory Heytings > cc: larsi@gnus.org, 57207@debbugs.gnu.org, yantar92@gmail.com > > > >> It is better to do that higher, because not only those places in > >> decode_mode_spec may wish to access BEGV and ZV. Even in the mode-line > >> display there are :eval and :when. > > > > Okay, I'll see what I can do. > > > > Now done in the feature branch, together with a few other improvements. Thanks. However, resetting the narrowing in _all_ buffers at the beginning of each redisplay cycle could be quite expensive in sessions with many hundreds of live buffers. E.g., my production sessions routinely have 300+ buffers, and I'm sure there are larger sessions out there. (We could perhaps make that less expensive by avoiding the potentially costly calls to buf_charpos_to_bytepos, but still.) How much time does the loop in reset_outermost_narrowings take per live buffer? Should we perhaps maintain a list of buffers with such narrowing? It should be a very short list. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 22 10:00:41 2022 Received: (at 57207) by debbugs.gnu.org; 22 Aug 2022 14:00:41 +0000 Received: from localhost ([127.0.0.1]:41404 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQ7yr-0005ZN-0O for submit@debbugs.gnu.org; Mon, 22 Aug 2022 10:00:41 -0400 Received: from heytings.org ([95.142.160.155]:35944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQ7yn-0005NG-Am for 57207@debbugs.gnu.org; Mon, 22 Aug 2022 10:00:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1661176835; bh=Qjkcbr40gaBqLwVGNJkiK7skTuCaJIXfXJbdU35AY0U=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=8QjOCfDJUaiAk9LIg8aIeNPdlioenNuaY0Y54/umeSrf5CDa69G96HWiZCnq6ivF9 69Jeg4mVRa1X+ztgK5QPJo0V0WvnC8WltJdHS6YrogogyYPywBM63H0/s9CyMmT0hl meCEaeEcjTc1xxECu1zgHodCYrubm7jstKZGhiJe5gXXLg+LldIpUAhomk1xYihuzX kCYYBsRNiblbP9K9JKIWVjWllXAtwq8DA6ELnHDqyUlsu3X6Nuixr5CzIj9sDDZ+eX /O3cLuVO6c5copqEpPG15rGJc13gOdHf9eZa5kWR2LQDUWJCJ1MwBYAJFOIe/j8Aai JevuMYb6GPyJw== Date: Mon, 22 Aug 2022 14:00:34 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <8335dobgr5.fsf@gnu.org> Message-ID: <3e33847476b5c1803dc8@heytings.org> References: <87bksmx1j1.fsf@localhost> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> <37dd2827f52038e95791@heytings.org> <83wnb2ddxd.fsf@gnu.org> <37dd2827f57a3d664931@heytings.org> <37dd2827f52c6a150684@heytings.org> <83tu66cfnr.fsf@gnu.org> <83fshpdctx.fsf@gnu.org> <83bksddag4.fsf@gnu.org> <8335dobgr5.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 57207 Cc: larsi@gnus.org, 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > > However, resetting the narrowing in _all_ buffers at the beginning of > each redisplay cycle could be quite expensive in sessions with many > hundreds of live buffers. > Actually, we only reset the locked narrowing in all buffers. An Emacs session would typically only have a handful of live buffers in which such a narrowing is used, i.e. a small fraction of the live buffers. > > How much time does the loop in reset_outermost_narrowings take per live > buffer? > About 150 ns/buffer here. I'll see whether and how it could be improved. > > Should we perhaps maintain a list of buffers with such narrowing? It > should be a very short list. > That's one possibility indeed. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 22 10:09:37 2022 Received: (at 57207) by debbugs.gnu.org; 22 Aug 2022 14:09:37 +0000 Received: from localhost ([127.0.0.1]:41407 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQ87V-0005zH-0k for submit@debbugs.gnu.org; Mon, 22 Aug 2022 10:09:37 -0400 Received: from heytings.org ([95.142.160.155]:35968) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQ87T-0005z9-7X for 57207@debbugs.gnu.org; Mon, 22 Aug 2022 10:09:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1661177374; bh=gYcGj1j+/b/drfeAl0CBKOX1gXwYl/uAgYuYs9n8GPc=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=to9UikagAwSpUUMl1oi5I2T1LixIyWYGjE2LzYMNZsS8IKE/RtMWft63gRsHtoTM3 OdOJZw22X3Qnnv3c3rNZDbwxN0z2Bpl69azhkDDP/RkpYb1ccpG1LUhrCBdMiEx8PQ u5Z+l1RvVTX46OxHRSAiuwJj9wMtaTJx3gtZD9FmWb6jv7hKOAi/i/rLMAmhrKazld TgSX5JtVpotnS0GgWtGCiM7OPRrEKSb1A+Wdns/E3Queed7jMHXOlQ7u2fFMEGO4ts XcdCg4wNGB8S1dVzzxNFrw++tiFC+nb1PaRWRfZtmT5/u5AlTHJDphM9fZYUG4JFWI 7Fu14v6jf3Ung== Date: Mon, 22 Aug 2022 14:09:34 +0000 From: Gregory Heytings To: Ihor Radchenko Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <87k071ko0m.fsf@localhost> Message-ID: <3e338474763bf6d68c39@heytings.org> References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <83bksmka08.fsf@gnu.org> <325f95fd2b7c0cc80613@heytings.org> <83y1voflmb.fsf@gnu.org> <325f95fd2bce114fd74d@heytings.org> <87r11g1ieu.fsf@localhost> <325f95fd2b82a19f6838@heytings.org> <37dd2827f539d0de2773@heytings.org> <87bksemg5g.fsf@localhost> <87k071ko0m.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Z5JVkt789n" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 57207 Cc: Eli Zaretskii , 57207@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --Z5JVkt789n Content-Type: text/plain; format=flowed; charset=utf-8 Content-Transfer-Encoding: quoted-printable > > The patch appears to solve the problem. I do not see the slowness any=20 > more. Initial fontification got a lot faster as well. > Thanks, wonderful! =F0=9F=98=83 Eli, do you have any objections about that patch (which replaces MODIFF=20 with CHARS_MODIFF in the long lines detection code), or can I push it to=20 master? --Z5JVkt789n-- From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 22 11:45:34 2022 Received: (at 57207) by debbugs.gnu.org; 22 Aug 2022 15:45:34 +0000 Received: from localhost ([127.0.0.1]:41535 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQ9cL-0008DA-R5 for submit@debbugs.gnu.org; Mon, 22 Aug 2022 11:45:34 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35916) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQ9cK-0007w8-GK for 57207@debbugs.gnu.org; Mon, 22 Aug 2022 11:45:32 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51330) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQ9cD-0004D0-KV; Mon, 22 Aug 2022 11:45:27 -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=eaDulmL4KA/YmvDtX8XprTxmsJ7al7dVZc6ZGM14/q8=; b=DEgYV0ZtUNW4 mnMPUH/LODXGd+TF0gtnAJRBEYgKVvMu0tIIbSXfKRSf6emcvL4x2jomJRjXMl0TEpeKxeFoGvBn+ bPdRP9NRBj9DuCd1FbJyq9ERLawTJWm8rJMEN8ybBxb0G1dm98a3KbcJO5Ys1Ho1ViUKkCkrw5n3D OFrxVOFvYQZpDglFYzSpcz7QRdfIW9ErkRG39TY4kfIs0M8BdF1+K4y0MwAZqQtUqRFO/KqiWBu4q 1xWAxyz9n6lXc+XJXw9J8hJkQ1wcKSAachM6NljrXaDBMHI9uhsFlcBTda5vp1VZ16avYRM79B2Ad r1Bcd162cZYVU2RpwtXyWg==; Received: from [87.69.77.57] (port=2680 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 1oQ9cD-00039h-3C; Mon, 22 Aug 2022 11:45:25 -0400 Date: Mon, 22 Aug 2022 18:45:29 +0300 Message-Id: <83fsho9t9i.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings In-Reply-To: <3e338474763bf6d68c39@heytings.org> (message from Gregory Heytings on Mon, 22 Aug 2022 14:09:34 +0000) Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <83bksmka08.fsf@gnu.org> <325f95fd2b7c0cc80613@heytings.org> <83y1voflmb.fsf@gnu.org> <325f95fd2bce114fd74d@heytings.org> <87r11g1ieu.fsf@localhost> <325f95fd2b82a19f6838@heytings.org> <37dd2827f539d0de2773@heytings.org> <87bksemg5g.fsf@localhost> <87k071ko0m.fsf@localhost> <3e338474763bf6d68c39@heytings.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Mon, 22 Aug 2022 14:09:34 +0000 > From: Gregory Heytings > cc: Eli Zaretskii , 57207@debbugs.gnu.org > > Eli, do you have any objections about that patch (which replaces MODIFF > with CHARS_MODIFF in the long lines detection code), or can I push it to > master? No objections. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 23 11:53:12 2022 Received: (at 57207) by debbugs.gnu.org; 23 Aug 2022 15:53:12 +0000 Received: from localhost ([127.0.0.1]:44859 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQWDH-0004wF-SY for submit@debbugs.gnu.org; Tue, 23 Aug 2022 11:53:12 -0400 Received: from heytings.org ([95.142.160.155]:37606) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQWDG-0004w6-Ip for 57207@debbugs.gnu.org; Tue, 23 Aug 2022 11:53:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1661269989; bh=XoQ54nOasZ3MlEWZBdEtDPXFtD6BIx7efm4y8E8fsOY=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=MHbXINLGv787Fk7MEALlgPA4VxCKNRAu4sHOBOlhPrU3kQsrkOiwFzQlFGyFbuMDo Z74+Z13C72iYy0tIN+TtSj+ZSbQVEUgZZIv7TD7pgkyYnLnuMJBh2U/LNiP/jVNQhr XUACCpq+YWnca+puEouBPk9HGUNYaKBciqETppJv+kzZoRVJaJXYbVWxe65RvZODdk hGVJnkCXWyQT/Hr4mzRsz7e2X5taLkQSrUzx/XrauYgcQyekzEY3XJ/O9t98JXhSCY eeulSqqOxOiWfpTWcF6ROSzr+Pev03aDjinlTXZ8Z6rHxQT/1HaYI6PwpZBHy7dUo6 1YmBmIHTK5yFw== Date: Tue, 23 Aug 2022 15:53:08 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <83fsho9t9i.fsf@gnu.org> Message-ID: <06db1973da523e62ad39@heytings.org> References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <83bksmka08.fsf@gnu.org> <325f95fd2b7c0cc80613@heytings.org> <83y1voflmb.fsf@gnu.org> <325f95fd2bce114fd74d@heytings.org> <87r11g1ieu.fsf@localhost> <325f95fd2b82a19f6838@heytings.org> <37dd2827f539d0de2773@heytings.org> <87bksemg5g.fsf@localhost> <87k071ko0m.fsf@localhost> <3e338474763bf6d68c39@heytings.org> <83fsho9t9i.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 57207 Cc: 57207@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> Eli, do you have any objections about that patch (which replaces MODIFF >> with CHARS_MODIFF in the long lines detection code), or can I push it >> to master? > > No objections. > Thanks, now done. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 24 04:07:46 2022 Received: (at 57207) by debbugs.gnu.org; 24 Aug 2022 08:07:46 +0000 Received: from localhost ([127.0.0.1]:45583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQlQP-0002db-Tv for submit@debbugs.gnu.org; Wed, 24 Aug 2022 04:07:46 -0400 Received: from mail-lj1-f172.google.com ([209.85.208.172]:38851) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQlQN-0002dN-0b for 57207@debbugs.gnu.org; Wed, 24 Aug 2022 04:07:44 -0400 Received: by mail-lj1-f172.google.com with SMTP id x25so15659067ljm.5 for <57207@debbugs.gnu.org>; Wed, 24 Aug 2022 01:07:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=yA8qHe/OA0GocYiNb321aMxB0ZGF4JmqPZgmi+Lk4fA=; b=kWQTrobEcoISmxmolTbOrUtBBmjjKQKeP0XiB4PLKxCV5jd3SA4QMYlkSRpKyWtuX3 QzKr+3XttvqV1ePMQyuctgX17Idq5F+lFlrlVlJJtOziV6MJJc6MDE42o5f+Lm08RWi5 4FJVG6fmmhL0KMnxoA3h2etN6bfia0SjsL4lYiPr+wUv14EP3yKAwhZMBFy06u5VkHCC 4Q2LFoKgNti981XTY8ihmxIqhPnMa+ROyTcs+Oy8DacWpNVXI9vL+3e9+HmmtpwmDi2e yiElA/0Gqa5fDcQ665Qn6zGun3TMfvpkLWZaxjGVbYPMQEPoRoY587hk4pxHGOpogZd3 lsgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=yA8qHe/OA0GocYiNb321aMxB0ZGF4JmqPZgmi+Lk4fA=; b=TnDQeCkmpdrE3rQ9uCs5qwYmtHXkTH3IhWUFP3uwxVGK03wwu1zAiN0JK3vFPYuUhr 7dRomvKlywCLXRfxQfhJVSaZXqdQNnFMCUppZLINneXP0cmBcIpQH5SQWqAAs+mMXcIW Wb6OumJPrJwToA6Erk2e2GEFFAmtNXpH2Bcf1MXN3U0zL4lHj/AsebNMpscTa/oFhHq+ I6KBMr5HQuai/e/YVP9IIOrF41e3tWhlfH6WxK3SH0UBSY+5tR00zpPFONKepS8KNIRA OHa8E1l8pRehOmHcW7RITRgov7qQeN3CsbNN1wfzH8HaYlDdSEEIaiOlJOEVvfWQsvo/ 7QCg== X-Gm-Message-State: ACgBeo18IFRxMz+fbZoId3Ay1BjCWtj8igfZjIYnQndQ2BTcg2MajUqn BwsbOtRXjAFehJ9i7jBaz1p7Qdt5KuB15WdoFGs= X-Google-Smtp-Source: AA6agR7rVRJ1Oj8TQRvEs52Vah9Tn1nTjW662A2ylVOVeF1dGi6VMor/ERXyYiZbZDMi6BCuugQrHYjR/xFCShhLnOQ= X-Received: by 2002:a2e:aaa8:0:b0:261:8102:9b5b with SMTP id bj40-20020a2eaaa8000000b0026181029b5bmr7416037ljb.417.1661328456494; Wed, 24 Aug 2022 01:07:36 -0700 (PDT) MIME-Version: 1.0 References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <83bksmka08.fsf@gnu.org> <325f95fd2b7c0cc80613@heytings.org> <83y1voflmb.fsf@gnu.org> <325f95fd2bce114fd74d@heytings.org> <87r11g1ieu.fsf@localhost> <325f95fd2b82a19f6838@heytings.org> <37dd2827f539d0de2773@heytings.org> <87bksemg5g.fsf@localhost> <87k071ko0m.fsf@localhost> <3e338474763bf6d68c39@heytings.org> <83fsho9t9i.fsf@gnu.org> <06db1973da523e62ad39@heytings.org> In-Reply-To: <06db1973da523e62ad39@heytings.org> From: Ihor Radchenko Date: Wed, 24 Aug 2022 16:08:32 +0800 Message-ID: Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) To: Gregory Heytings Content-Type: multipart/alternative; boundary="00000000000081313e05e6f82c4e" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 57207 Cc: Eli Zaretskii , 57207@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --00000000000081313e05e6f82c4e Content-Type: text/plain; charset="UTF-8" With the latest master, the fontification gets completely broken. IDK if it is related to this specific patch, but I got the following redisplay backtrace. Note that org-element--parse-objects has the following: (save-excursion (save-restriction (narrow-to-region beg end) (goto-char (point-min)) (let (next-object contents) (while (and (not (eobp)) (setq next-object (org-element--object-lex restriction))) The infinite recursion did not happen on the same Org file in the past. So, it is not an issue with logic. Most likely, there is something about narrowing/point movement that is very wrong on Emacs master. (Another oddity is https://list.orgmode.org/87y1vf2zbe.fsf@localhost/T/#t) Error: excessive-lisp-nesting nil debug-early-backtrace() debug-early(error (excessive-lisp-nesting)) rx--parse-any((space 45 40 39 34 123)) rx--translate-any(nil (space 45 40 39 34 123)) rx--translate-form((any space 45 40 39 34 123)) rx--translate((any space 45 40 39 34 123)) #((any space 45 40 39 34 123)) mapcan(# ((any space 45 40 39 34 123))) rx--translate-or((line-start (any space 45 40 39 34 123))) rx--translate-form((or line-start (any space 45 40 39 34 123))) rx--translate((or line-start (any space 45 40 39 34 123))) rx--translate-seq(((or line-start (any space 45 40 39 34 123)) "*" (not space))) rx--translate-form((seq (or line-start (any space 45 40 39 34 123)) "*" (not space))) rx--translate((seq (or line-start (any space 45 40 39 34 123)) "*" (not space))) rx-to-string((seq (or line-start (any space 45 40 39 34 123)) "*" (not space))) org-element--parse-generic-emphasis("*" bold) org-element-bold-parser() org-element--object-lex((bold citation code entity export-snippet footnote-reference inline-babel-call inline-src-block italic line-break latex-fragment link macro radio-target statistics-cookie strike-through subscript superscript target timestamp underline verbatim)) --- (line repeated 100s of times) ---- org-element--parse-objects(5 54 (bold (:begin 4 :end 55 :post-blank 0 :contents-begin 5 :contents-end 54 :parent (bold (:begin 4 :end 55 :post-blank 0 :contents-begin 5 :contents-end 54 :parent (bold (:begin 4 :end 55 :post-blank 0 :contents-begin 5 :contents-end 54 :parent (bold (:begin 4 :end 55 :post-blank 0 :contents-begin 5 :contents-end 54 :parent (bold (:begin 4 :end 55 :post-blank 0 :contents-begin 5 :contents-end 54 :parent ( (bold citation code entity export-snippet footnote-reference inline-babel-call inline-src-block italic line-break latex-fragment link macro radio-target statistics-cookie strike-through subscript superscript target timestamp underline verbatim)) org-element--parse-objects(5 54 (bold (:begin 4 :end 55 :post-blank 0 :contents-begin 5 :contents-end 54 :parent (bold (:begin 4 :end 55 :post-blank 0 :contents-begin 5 :contents-end 54 :parent (bold (:begin 4 :end 55 :post-blank 0 :contents-begin 5 :contents-end 54 :parent (bold (:begin 4 :end 55 :post-blank 0 :contents-begin 5 :contents-end 54 :parent (bold (:begin 4 :end 55 :post-blank 0 :contents-begin 5 :contents-end 54)))))))))) (bold citation code entity export-snippet footnote-reference inline-babel-call inline-src-block italic line-break latex-fragment link macro radio-target statistics-cookie strike-through subscript superscript target timestamp underline verbatim)) org-element--parse-objects(5 54 (bold (:begin 4 :end 55 :post-blank 0 :contents-begin 5 :contents-end 54 :parent (bold (:begin 4 :end 55 :post-blank 0 :contents-begin 5 :contents-end 54 :parent (bold (:begin 4 :end 55 :post-blank 0 :contents-begin 5 :contents-end 54 :parent (bold (:begin 4 :end 55 :post-blank 0 :contents-begin 5 :contents-end 54)))))))) (bold citation code entity export-snippet footnote-reference inline-babel-call inline-src-block italic line-break latex-fragment link macro radio-target statistics-cookie strike-through subscript superscript target timestamp underline verbatim)) org-element--parse-objects(5 54 (bold (:begin 4 :end 55 :post-blank 0 :contents-begin 5 :contents-end 54 :parent (bold (:begin 4 :end 55 :post-blank 0 :contents-begin 5 :contents-end 54 :parent (bold (:begin 4 :end 55 :post-blank 0 :contents-begin 5 :contents-end 54)))))) (bold citation code entity export-snippet footnote-reference inline-babel-call inline-src-block italic line-break latex-fragment link macro radio-target statistics-cookie strike-through subscript superscript target timestamp underline verbatim)) org-element--parse-objects(5 54 (bold (:begin 4 :end 55 :post-blank 0 :contents-begin 5 :contents-end 54 :parent (bold (:begin 4 :end 55 :post-blank 0 :contents-begin 5 :contents-end 54)))) (bold citation code entity export-snippet footnote-reference inline-babel-call inline-src-block italic line-break latex-fragment link macro radio-target statistics-cookie strike-through subscript superscript target timestamp underline verbatim)) org-element--parse-objects(5 54 (bold (:begin 4 :end 55 :post-blank 0 :contents-begin 5 :contents-end 54)) (bold citation code entity export-snippet footnote-reference inline-babel-call inline-src-block italic line-break latex-fragment link macro radio-target statistics-cookie strike-through subscript superscript target timestamp underline verbatim)) org-element--parse-objects(242 246 nil (bold citation code entity export-snippet footnote-reference inline-babel-call inline-src-block italic latex-fragment link macro radio-target statistics-cookie strike-through subscript superscript target timestamp underline verbatim) (headline (:raw-value "Home" :begin 240 :end 13776 :pre-blank 358 :contents-begin 264 :contents-end 13776 :robust-begin 266 :robust-end 13774 :level 1 :priority nil :tags (#("COMMON" 0 6 (fontified t)) #("NOCLOCK" 0 7 (fontified t))) :todo-keyword nil :todo-type nil :post-blank 359 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 240 :parent nil :structure nil :deferred org-element-headline-parser--deferred))) org-element-headline-parser(327004 nil) org-element--current-element(327004 object nil nil) org-element--parse-elements(240 327004 nil nil object nil nil no-recursion) org-element-parse-element((headline (:raw-value #1="Home" :begin 240 :end 327004 :pre-blank 0 :contents-begin 264 :contents-end 326998 :robust-begin 356 :robust-end 326996 :level 1 :priority nil :tags ("COMMON" "NOCLOCK") :todo-keyword nil :todo-type nil :post-blank 2 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 240 :parent #2=(org-data (:begin 1 :contents-begin 1 :contents-end 326998 :end 327004 :robust-begin 123 :robust-end 326996 :post-blank 2 :post-affiliated 1 :path "/home/yantar92/Org/TODO.org" :mode org-data :ID "157580d6-61cc-4541-bf5c-46a1dbf25b13" :CATEGORY "TODO" :cached t :org-element--cache-sync-key nil)) :structure nil :deferred nil :title #1# :mode nil :granularity element :org-element--cache-sync-key nil :cached t :ID "2489bdb2-054e-4dc1-97d6-3298c70b742a" :ORG-TIME-BALANCE-MULTIPLIER "1" :fragile-cache #)) object nil no-recursion) org-font-lock-matcher(1542) font-lock-fontify-keywords-region(1 1542 nil) font-lock-default-fontify-region(1 1501 nil) font-lock-fontify-region(1 1501) #f(compiled-function (fun) #)(font-lock-fontify-region) jit-lock--run-functions(1 1501) jit-lock-fontify-now(1 1501) jit-lock-function(1) redisplay_internal\ \(C\ function\)() On Tue, Aug 23, 2022 at 11:53 PM Gregory Heytings wrote: > > >> Eli, do you have any objections about that patch (which replaces MODIFF > >> with CHARS_MODIFF in the long lines detection code), or can I push it > >> to master? > > > > No objections. > > > > Thanks, now done. > --00000000000081313e05e6f82c4e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
With the latest master, the fontification gets completely = broken.

IDK if it is related to this specific patch, but= I got the following redisplay backtrace.
Note that org-element--= parse-objects has the following:

=C2=A0 (save-excu= rsion
=C2=A0 =C2=A0 (save-restriction
=C2=A0 =C2=A0 =C2=A0 (narrow-to= -region beg end)
=C2=A0 =C2=A0 =C2=A0 (goto-char (point-min))
=C2=A0 = =C2=A0 =C2=A0 (let (next-object contents)
(while (and (not (eobp))
= =C2=A0 =C2=A0(setq next-object (org-element--object-lex restriction)))

The infinite recursion did not happen on the same Or= g file in the past. So, it is not an issue with logic. Most likely, there i= s something about narrowing/point movement that is very wrong on Emacs mast= er.


Error: excessive-lis= p-nesting nil
=C2=A0 debug-early-backtrace()
=C2=A0 debug-early(error= (excessive-lisp-nesting))
=C2=A0 rx--parse-any((space 45 40 39 34 123))=
=C2=A0 rx--translate-any(nil (space 45 40 39 34 123))
=C2=A0 rx--tra= nslate-form((any space 45 40 39 34 123))
=C2=A0 rx--translate((any space= 45 40 39 34 123))
=C2=A0 #<subr F616e6f6e796d6f75732d6c616d626461_an= onymous_lambda_2>((any space 45 40 39 34 123))
=C2=A0 mapcan(#<sub= r F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_2> ((any space 45 4= 0 39 34 123)))
=C2=A0 rx--translate-or((line-start (any space 45 40 39 3= 4 123)))
=C2=A0 rx--translate-form((or line-start (any space 45 40 39 34= 123)))
=C2=A0 rx--translate((or line-start (any space 45 40 39 34 123))= )
=C2=A0 rx--translate-seq(((or line-start (any space 45 40 39 34 123)) = "*" (not space)))
=C2=A0 rx--translate-form((seq (or line-star= t (any space 45 40 39 34 123)) "*" (not space)))
=C2=A0 rx--tr= anslate((seq (or line-start (any space 45 40 39 34 123)) "*" (not= space)))
=C2=A0 rx-to-string((seq (or line-start (any space 45 40 39 34= 123)) "*" (not space)))
=C2=A0 org-element--parse-generic-emp= hasis("*" bold)
=C2=A0 org-element-bold-parser()
=C2=A0 org= -element--object-lex((bold citation code entity export-snippet footnote-ref= erence inline-babel-call inline-src-block italic line-break latex-fragment = link macro radio-target statistics-cookie strike-through subscript superscr= ipt target timestamp underline verbatim))
--- (line repeated = 100s of times) ----
=C2=A0 org-element--parse-objects(5 54 (bold = (:begin 4 :end 55 :post-blank 0 :contents-begin 5 :contents-end 54 :parent = (bold (:begin 4 :end 55 :post-blank 0 :contents-begin 5 :contents-end 54 :p= arent (bold (:begin 4 :end 55 :post-blank 0 :contents-begin 5 :contents-end= 54 :parent (bold (:begin 4 :end 55 :post-blank 0 :contents-begin 5 :conten= ts-end 54 :parent (bold (:begin 4 :end 55 :post-blank 0 :contents-begin 5 := contents-end 54 :parent ( (bold citation code entity export-snippet footnot= e-reference inline-babel-call inline-src-block italic line-break latex-frag= ment link macro radio-target statistics-cookie strike-through subscript sup= erscript target timestamp underline verbatim))
=C2=A0 org-element--parse= -objects(5 54 (bold (:begin 4 :end 55 :post-blank 0 :contents-begin 5 :cont= ents-end 54 :parent (bold (:begin 4 :end 55 :post-blank 0 :contents-begin 5= :contents-end 54 :parent (bold (:begin 4 :end 55 :post-blank 0 :contents-b= egin 5 :contents-end 54 :parent (bold (:begin 4 :end 55 :post-blank 0 :cont= ents-begin 5 :contents-end 54 :parent (bold (:begin 4 :end 55 :post-blank 0= :contents-begin 5 :contents-end 54)))))))))) (bold citation code entity ex= port-snippet footnote-reference inline-babel-call inline-src-block italic l= ine-break latex-fragment link macro radio-target statistics-cookie strike-t= hrough subscript superscript target timestamp underline verbatim))
=C2= =A0 org-element--parse-objects(5 54 (bold (:begin 4 :end 55 :post-blank 0 := contents-begin 5 :contents-end 54 :parent (bold (:begin 4 :end 55 :post-bla= nk 0 :contents-begin 5 :contents-end 54 :parent (bold (:begin 4 :end 55 :po= st-blank 0 :contents-begin 5 :contents-end 54 :parent (bold (:begin 4 :end = 55 :post-blank 0 :contents-begin 5 :contents-end 54)))))))) (bold citation = code entity export-snippet footnote-reference inline-babel-call inline-src-= block italic line-break latex-fragment link macro radio-target statistics-c= ookie strike-through subscript superscript target timestamp underline verba= tim))
=C2=A0 org-element--parse-objects(5 54 (bold (:begin 4 :end 55 :po= st-blank 0 :contents-begin 5 :contents-end 54 :parent (bold (:begin 4 :end = 55 :post-blank 0 :contents-begin 5 :contents-end 54 :parent (bold (:begin 4= :end 55 :post-blank 0 :contents-begin 5 :contents-end 54)))))) (bold citat= ion code entity export-snippet footnote-reference inline-babel-call inline-= src-block italic line-break latex-fragment link macro radio-target statisti= cs-cookie strike-through subscript superscript target timestamp underline v= erbatim))
=C2=A0 org-element--parse-objects(5 54 (bold (:begin 4 :end 55= :post-blank 0 :contents-begin 5 :contents-end 54 :parent (bold (:begin 4 := end 55 :post-blank 0 :contents-begin 5 :contents-end 54)))) (bold citation = code entity export-snippet footnote-reference inline-babel-call inline-src-= block italic line-break latex-fragment link macro radio-target statistics-c= ookie strike-through subscript superscript target timestamp underline verba= tim))
=C2=A0 org-element--parse-objects(5 54 (bold (:begin 4 :end 55 :po= st-blank 0 :contents-begin 5 :contents-end 54)) (bold citation code entity = export-snippet footnote-reference inline-babel-call inline-src-block italic= line-break latex-fragment link macro radio-target statistics-cookie strike= -through subscript superscript target timestamp underline verbatim))
=C2= =A0 org-element--parse-objects(242 246 nil (bold citation code entity expor= t-snippet footnote-reference inline-babel-call inline-src-block italic late= x-fragment link macro radio-target statistics-cookie strike-through subscri= pt superscript target timestamp underline verbatim) (headline (:raw-value &= quot;Home" :begin 240 :end 13776 :pre-blank 358 :contents-begin 264 :c= ontents-end 13776 :robust-begin 266 :robust-end 13774 :level 1 :priority ni= l :tags (#("COMMON" 0 6 (fontified t)) #("NOCLOCK" 0 7 = (fontified t))) :todo-keyword nil :todo-type nil :post-blank 359 :footnote-= section-p nil :archivedp nil :commentedp nil :post-affiliated 240 :parent n= il :structure nil :deferred org-element-headline-parser--deferred)))
=C2= =A0 org-element-headline-parser(327004 nil)
=C2=A0 org-element--current-= element(327004 object nil nil)
=C2=A0 org-element--parse-elements(240 32= 7004 nil nil object nil nil no-recursion)
=C2=A0 org-element-parse-eleme= nt((headline (:raw-value #1=3D"Home" :begin 240 :end 327004 :pre-= blank 0 :contents-begin 264 :contents-end 326998 :robust-begin 356 :robust-= end 326996 :level 1 :priority nil :tags ("COMMON" "NOCLOCK&q= uot;) :todo-keyword nil :todo-type nil :post-blank 2 :footnote-section-p ni= l :archivedp nil :commentedp nil :post-affiliated 240 :parent #2=3D(org-dat= a (:begin 1 :contents-begin 1 :contents-end 326998 :end 327004 :robust-begi= n 123 :robust-end 326996 :post-blank 2 :post-affiliated 1 :path "/home= /yantar92/Org/TODO.org" :mode org-data :ID "157580d6-61cc-4541-bf= 5c-46a1dbf25b13" :CATEGORY "TODO" :cached t :org-element--ca= che-sync-key nil)) :structure nil :deferred nil :title #1# :mode nil :granu= larity element :org-element--cache-sync-key nil :cached t :ID "2489bdb= 2-054e-4dc1-97d6-3298c70b742a" :ORG-TIME-BALANCE-MULTIPLIER "1&qu= ot; :fragile-cache #<hash-table equal 2/65 0x1ffb2d613ec3>)) object n= il no-recursion)
=C2=A0 org-font-lock-matcher(1542)
=C2=A0 font-lock-= fontify-keywords-region(1 1542 nil)
=C2=A0 font-lock-default-fontify-reg= ion(1 1501 nil)
=C2=A0 font-lock-fontify-region(1 1501)
=C2=A0 #f(com= piled-function (fun) #<bytecode -0x156e7c74145e6b83>)(font-lock-fonti= fy-region)
=C2=A0 jit-lock--run-functions(1 1501)
=C2=A0 jit-lock-fon= tify-now(1 1501)
=C2=A0 jit-lock-function(1)
=C2=A0 redisplay_interna= l\ \(C\ function\)()

On Tue, Aug 23, 2022 at 11:53 PM Gregory Heyt= ings <gregory@heytings.org&g= t; wrote:

>> Eli, do you have any objections about that patch (which replaces M= ODIFF
>> with CHARS_MODIFF in the long lines detection code), or can I push= it
>> to master?
>
> No objections.
>

Thanks, now done.
--00000000000081313e05e6f82c4e-- From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 24 04:26:55 2022 Received: (at 57207) by debbugs.gnu.org; 24 Aug 2022 08:26:55 +0000 Received: from localhost ([127.0.0.1]:45608 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQliw-00037n-Kz for submit@debbugs.gnu.org; Wed, 24 Aug 2022 04:26:54 -0400 Received: from heytings.org ([95.142.160.155]:38614) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQliv-00037f-41 for 57207@debbugs.gnu.org; Wed, 24 Aug 2022 04:26:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1661329612; bh=WhdoZ+QaeQk5xb9OMES3Z5ZC6bOzjpKQSLlHqb2tWUU=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=I7sx33lsbmZsr9lkPSWIUyXcrAj5rnrOfmYuClYGJjk33LvEAL8FYKDWXwPvy/wU1 unfrkdxsAcHpQX6lcXRl2hB+Zydn7Z3MaJ+hT/lnsyP1QcPjZrnWmVuEYtZZHNAxYL 21gWDM9n4bSNik503tomgwBsHem+z6ZJuSNliDkHLO07IyJCTOWGh1e0PZLC/2gvJB sOLr+C9EAU/L4rKL8UHVS4I/Ou9hvpvW/xEyBth/ofrKOnGtBkxovzMp7x0ytvXnS6 K3A8lKlNUSTHdKF0QASv8sKQfiU35M3WcNlzgOghBEvambsEUgOmX63lCnbLybNswd ZEuS+iQzX7L6A== Date: Wed, 24 Aug 2022 08:26:51 +0000 From: Gregory Heytings To: Ihor Radchenko Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: Message-ID: <41c62c2d9e57bc44b587@heytings.org> References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <83bksmka08.fsf@gnu.org> <325f95fd2b7c0cc80613@heytings.org> <83y1voflmb.fsf@gnu.org> <325f95fd2bce114fd74d@heytings.org> <87r11g1ieu.fsf@localhost> <325f95fd2b82a19f6838@heytings.org> <37dd2827f539d0de2773@heytings.org> <87bksemg5g.fsf@localhost> <87k071ko0m.fsf@localhost> <3e338474763bf6d68c39@heytings.org> <83fsho9t9i.fsf@gnu.org> <06db1973da523e62ad39@heytings.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="2n9TtG2ozV" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 57207 Cc: Eli Zaretskii , 57207@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --2n9TtG2ozV Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable > > With the latest master, the fontification gets completely broken. > > IDK if it is related to this specific patch, but I got the following=20 > redisplay backtrace. > > Note that org-element--parse-objects has the following: >=20 > =C2=A0 (save-excursion > =C2=A0 =C2=A0 (save-restriction > =C2=A0 =C2=A0 =C2=A0 (narrow-to-region beg end) > =C2=A0 =C2=A0 =C2=A0 (goto-char (point-min)) > =C2=A0 =C2=A0 =C2=A0 (let (next-object contents) > (while (and (not (eobp)) > =C2=A0 =C2=A0(setq next-object (org-element--object-lex restriction))) > > The infinite recursion did not happen on the same Org file in the past.= =20 > So, it is not an issue with logic. Most likely, there is something about= =20 > narrowing/point movement that is very wrong on Emacs master. > I'm puzzled, you tried the patch and said it improved fontification? Can= =20 you try to revert 1c837c42c2 and see if it works again? Or can you=20 provide (privately if necessary) an example file with which that error is= =20 triggered? --2n9TtG2ozV-- From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 10 04:10:06 2022 Received: (at 57207) by debbugs.gnu.org; 10 Oct 2022 08:10:06 +0000 Received: from localhost ([127.0.0.1]:45841 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohnrS-0006Ga-Ef for submit@debbugs.gnu.org; Mon, 10 Oct 2022 04:10:06 -0400 Received: from quimby.gnus.org ([95.216.78.240]:52646) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohnrQ-0006Fz-Nu for 57207@debbugs.gnu.org; Mon, 10 Oct 2022 04:10:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=fQWKFw6COac0wN9uqsPDpPwGmbbTPzIA5Lf6vIm6Hi4=; b=QXAmwrbVodIOQeNf1x8QcvspwO EjX2go1axb5N4MX/5eevdhPjPWLAUvwYxrMKBNSLGlYp6/Su/ilSZqPZHOQuwub0PPgxuKWsalZhe MJTZSlWiWldNPgJ+LLx4oMzlIV6AGGxiEZfT/4Z8prdBm77UlLUvIPl89kFpSovP1fXk=; Received: from [84.212.220.105] (helo=downe) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ohnrG-0006Uq-Dk; Mon, 10 Oct 2022 10:09:56 +0200 From: Lars Ingebrigtsen To: Gregory Heytings Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <41c62c2d9e57bc44b587@heytings.org> (Gregory Heytings's message of "Wed, 24 Aug 2022 08:26:51 +0000") References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <83bksmka08.fsf@gnu.org> <325f95fd2b7c0cc80613@heytings.org> <83y1voflmb.fsf@gnu.org> <325f95fd2bce114fd74d@heytings.org> <87r11g1ieu.fsf@localhost> <325f95fd2b82a19f6838@heytings.org> <37dd2827f539d0de2773@heytings.org> <87bksemg5g.fsf@localhost> <87k071ko0m.fsf@localhost> <3e338474763bf6d68c39@heytings.org> <83fsho9t9i.fsf@gnu.org> <06db1973da523e62ad39@heytings.org> <41c62c2d9e57bc44b587@heytings.org> X-Now-Playing: Sheila Chandra's _Nada Brahma_: "Question the Answer" Date: Mon, 10 Oct 2022 10:09:53 +0200 Message-ID: <871qrgp0a6.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Gregory, we should get the fixes for the long line stuff into "master" soonish. Is there anything getting in the way of doing that? Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: Eli Zaretskii , Ihor Radchenko , 57207@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Gregory, we should get the fixes for the long line stuff into "master" soonish. Is there anything getting in the way of doing that? From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 10 08:03:45 2022 Received: (at 57207) by debbugs.gnu.org; 10 Oct 2022 12:03:45 +0000 Received: from localhost ([127.0.0.1]:46330 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohrVY-0002D0-TA for submit@debbugs.gnu.org; Mon, 10 Oct 2022 08:03:45 -0400 Received: from heytings.org ([95.142.160.155]:50136) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohrVX-0002Cq-B9 for 57207@debbugs.gnu.org; Mon, 10 Oct 2022 08:03:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1665403422; bh=S1tfd7P3fiSZSjGbDCbVt9R/gbg2duRj7jnERmL7E1A=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=xlD4WPX6iSHP0qkWutRO9YhNfvnmKNuMI3iBtDTbK2JwbIXkZ42vg6YTkkia/CFmZ NkdyOkKm/HMVOLGFCo1CA9L7X8Ke6fqbq0tMVzMMyCKrY8X4DXGVRx3IlditMKkech 9KqxFB7EhlYIdlWfdxLnfk0XSDE1ZJc9jl2EZDxY8bvMLBQhFxxpP3mlLf77tAYsk9 GjvCiHoI2aqk2qE1MVTu76w81L12d5F/wMwVXkncGLLnsDmHF7T/JES2mti+Aoa2vv 15pdcTI27ahxps69ytKrcRL7pJ7NHGBkd40ie5Bbf5xuoeiwQP2ex4CzENSof1mkH3 w33g4UPMTm5MA== Date: Mon, 10 Oct 2022 12:03:41 +0000 From: Gregory Heytings To: Lars Ingebrigtsen Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <871qrgp0a6.fsf@gnus.org> Message-ID: <13a96c3dfc27b1676ddf@heytings.org> References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <83bksmka08.fsf@gnu.org> <325f95fd2b7c0cc80613@heytings.org> <83y1voflmb.fsf@gnu.org> <325f95fd2bce114fd74d@heytings.org> <87r11g1ieu.fsf@localhost> <325f95fd2b82a19f6838@heytings.org> <37dd2827f539d0de2773@heytings.org> <87bksemg5g.fsf@localhost> <87k071ko0m.fsf@localhost> <3e338474763bf6d68c39@heytings.org> <83fsho9t9i.fsf@gnu.org> <06db1973da523e62ad39@heytings.org> <41c62c2d9e57bc44b587@heytings.org> <871qrgp0a6.fsf@gnus.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Gxo9fYqdh2" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 57207 Cc: Eli Zaretskii , Ihor Radchenko , 57207@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --Gxo9fYqdh2 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable > > Gregory, we should get the fixes for the long line stuff into "master"=20 > soonish. Is there anything getting in the way of doing that? > Yes: $job =F0=9F=98=89 I know I will have much more free time in two weeks= =2E I=20 apologize for the delay. --Gxo9fYqdh2-- From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 10 20:25:58 2022 Received: (at 57207) by debbugs.gnu.org; 11 Oct 2022 00:25:58 +0000 Received: from localhost ([127.0.0.1]:50262 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oi35q-0005Ai-Cx for submit@debbugs.gnu.org; Mon, 10 Oct 2022 20:25:58 -0400 Received: from quimby.gnus.org ([95.216.78.240]:60380) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oi35o-0005AV-KX for 57207@debbugs.gnu.org; Mon, 10 Oct 2022 20:25:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=3rTEVzZeSo8PCphOcJ5DKxsgUcDjZOHc3TXezs+c/w8=; b=CrXGDpS8clsYSWXJBNxZmqopts SLZbHepn1cAN4Zi/pxlO632yzrD+mNHSaM7MpBxava7fV2+j6xclPjMGzXWbOvmbrz+CUSKxNyxDQ S9w2jKw1OWTJF2C4pVjdXP0+X+IKIEK8cSl+2GQ5ZUH8PhnJOCWfWKIGLzyIpfp4tb1E=; Received: from [84.212.220.105] (helo=downe) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oi35e-0006AH-Uz; Tue, 11 Oct 2022 02:25:49 +0200 From: Lars Ingebrigtsen To: Gregory Heytings Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <13a96c3dfc27b1676ddf@heytings.org> (Gregory Heytings's message of "Mon, 10 Oct 2022 12:03:41 +0000") References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <83bksmka08.fsf@gnu.org> <325f95fd2b7c0cc80613@heytings.org> <83y1voflmb.fsf@gnu.org> <325f95fd2bce114fd74d@heytings.org> <87r11g1ieu.fsf@localhost> <325f95fd2b82a19f6838@heytings.org> <37dd2827f539d0de2773@heytings.org> <87bksemg5g.fsf@localhost> <87k071ko0m.fsf@localhost> <3e338474763bf6d68c39@heytings.org> <83fsho9t9i.fsf@gnu.org> <06db1973da523e62ad39@heytings.org> <41c62c2d9e57bc44b587@heytings.org> <871qrgp0a6.fsf@gnus.org> <13a96c3dfc27b1676ddf@heytings.org> X-Now-Playing: Metalheadz's _15 Years of Metalheadz_: "Swarm" Date: Tue, 11 Oct 2022 02:25:46 +0200 Message-ID: <87mta3kxyt.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Gregory Heytings writes: > Yes: $job 😉 I know I will have much more free time in two weeks. I > apologize for the delay. Thanks; no prob. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57207 Cc: Eli Zaretskii , Ihor Radchenko , 57207@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Gregory Heytings writes: > Yes: $job =F0=9F=98=89 I know I will have much more free time in two wee= ks. I > apologize for the delay. Thanks; no prob. From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 08 05:06:02 2022 Received: (at 57207-done) by debbugs.gnu.org; 8 Dec 2022 10:06:02 +0000 Received: from localhost ([127.0.0.1]:55750 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3Dn0-00089q-BC for submit@debbugs.gnu.org; Thu, 08 Dec 2022 05:06:02 -0500 Received: from heytings.org ([95.142.160.155]:48622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3Dmy-00089T-MN for 57207-done@debbugs.gnu.org; Thu, 08 Dec 2022 05:06:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1670493959; bh=RwMFaEk58AldCFUchgiqzTKrYGQpcpCkA22L9ilc9xM=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=3fioQ21HDss6jqowuX8u0fxIOehtxldQp8lcjwgXSCGP+BHNECqADLpl1lwogiV3c kd7IkzZZhyM10xQQTm16C4/VsLMMDuZz/lStOdloAWdYsoHso/+jJeKoaX0Zg2ai2F jxsUpSrFGLAIVM5YWIyA/joEouQ04T0s9WMzvz2ynb7HKa35yA6217dNO3CIBozwGG KLTWUp0hsN7reDuvGd1Fq9MTsN0SXXVHCsn1iw+XKcZyR50kipIM4+NbEWBu4hTdTN hbpNWagsRpd/Lkmjm0ztTY6Uiz9wiec1JrKVvCcXW40tX+714JoOpTft8Tq46KpRIm hHm0KPn0Jdwew== Date: Thu, 08 Dec 2022 10:05:58 +0000 From: Gregory Heytings To: 57207-done@debbugs.gnu.org Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) In-Reply-To: <41c62c2d9e57bc44b587@heytings.org> Message-ID: References: <87bksmx1j1.fsf@localhost> <5900f208367791fbdfe2@heytings.org> <83bksmka08.fsf@gnu.org> <325f95fd2b7c0cc80613@heytings.org> <83y1voflmb.fsf@gnu.org> <325f95fd2bce114fd74d@heytings.org> <87r11g1ieu.fsf@localhost> <325f95fd2b82a19f6838@heytings.org> <37dd2827f539d0de2773@heytings.org> <87bksemg5g.fsf@localhost> <87k071ko0m.fsf@localhost> <3e338474763bf6d68c39@heytings.org> <83fsho9t9i.fsf@gnu.org> <06db1973da523e62ad39@heytings.org> <41c62c2d9e57bc44b587@heytings.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 57207-done Cc: Ihor Radchenko X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Ihor confirmed (privately) that this bug is fixed. Closing. From unknown Sun Jun 22 17:13:45 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 05 Jan 2023 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator