GNU bug report logs - #67326
28.1.90.1; time-stamp slowdown in large org file after org-refile-get-targets, caused by e7b5912b23 (Improvements to long lines handling)

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Yuchen Pei <id@HIDDEN>; merged with #67327, #67330; dated Tue, 21 Nov 2023 14:17:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 67326 <at> debbugs.gnu.org:


Received: (at 67326) by debbugs.gnu.org; 12 Jan 2024 00:13:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 11 19:13:53 2024
Received: from localhost ([127.0.0.1]:34334 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rO5BI-00040q-Ul
	for submit <at> debbugs.gnu.org; Thu, 11 Jan 2024 19:13:53 -0500
Received: from heytings.org ([95.142.160.155]:44458)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1rO5BG-00040h-Bs
 for 67326 <at> debbugs.gnu.org; Thu, 11 Jan 2024 19:13:51 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20220101; t=1705018431;
 bh=vnF2/sOtene1pNwzl1n4ZufmKiRmjBUAJnqBZl0Ey6w=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=5c4wB3L74R6VomODCSiGQ9uM/cTX2Pe1neU0FxQ5D80kNfmiULNQKqB4+sj3OGoL4
 Z53LcXnHbtnTgXghR7PLzw0IQ5wsjuA5vtDUpWIMbnBIhbJ8BvbsM6wcjNfOT8KaZJ
 obD0hg1FDD47iPLaccRji08I0A/aeIdnGsGxxehMrWIs4+SG4B85OIYrDogX+FXcQA
 VC5GwdBG0ATrlZBMqiBTj2fa96BISUq5JPeNpBmwkKZKgES61S3qWaQpeb3os6vlEK
 EtxlRd/N+EoCPVAHQ3+poSMIkuCVv87wwFWad637VdpcCoGZafzur6TmWVogjC1r+/
 zY8aq/eOmzIfg==
Date: Fri, 12 Jan 2024 00:13:51 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Yuchen Pei <id@HIDDEN>
Subject: Re: bug#67326: 29.1.90.1; time-stamp slowdown in large org file
 after org-refile-get-targets, caused by e7b5912b23 (Improvements to long
 lines handling)
In-Reply-To: <87o7fn9txn.fsf@HIDDEN>
Message-ID: <4719da9bc2ffe34f1a2f@HIDDEN>
References: <87o7fn9txn.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset=us-ascii
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 67326
Cc: 67326 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


Hi Yuchen,

Thanks for your bug report, and sorry for the delay.

>
> Set up: foo.org is a 12MB file, longest line 4753, about 21000 
> headlines. It contains the timestamp thingie "Time-stamp: <....>" as one 
> of the first few lines that already has a timestamp from before.
>

I can't reproduce that bug alas, because I don't have that file.  I 
understand that it may contain private information.  Could you perhaps 
create a censored version of that file, and send it to me (privately, a 12 
MB attachments is too large for this list)?

>
> Like bug#57207,
>

This bug is likely not directly related to that one, as Ihor confirmed 
that it was fixed (and no other similar reports were filed since then).

>
> BTW what is the commit that fixed bug#57207? I searched for commits in 
> master and emacs-29 with message containing 57207 but could not find 
> any.
>

The reason for that is that development happened on feature branches, on 
which commits were not tagged as fixing specific bugs.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#67326; Package emacs. Full text available.

Message received at 67326 <at> debbugs.gnu.org:


Received: (at 67326) by debbugs.gnu.org; 25 Nov 2023 06:12:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 25 01:12:21 2023
Received: from localhost ([127.0.0.1]:37624 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1r6ltt-00041u-1u
	for submit <at> debbugs.gnu.org; Sat, 25 Nov 2023 01:12:21 -0500
Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:52533)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <id@HIDDEN>) id 1r6ltp-00041a-4L
 for 67326 <at> debbugs.gnu.org; Sat, 25 Nov 2023 01:12:20 -0500
Received: from compute7.internal (compute7.nyi.internal [10.202.2.48])
 by mailout.west.internal (Postfix) with ESMTP id 921DB3200A26
 for <67326 <at> debbugs.gnu.org>; Sat, 25 Nov 2023 01:12:05 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute7.internal (MEProxy); Sat, 25 Nov 2023 01:12:05 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ypei.org; h=cc
 :content-type:content-type:date:date:from:from:in-reply-to
 :in-reply-to:message-id:mime-version:references:reply-to:sender
 :subject:subject:to:to; s=fm2; t=1700892725; x=1700979125; bh=NS
 LXaXJxni6aaUKYM1oNuGzr6nC3clwUmpKDFA0Sq/M=; b=qWWFqOyqPfHA6cvT8n
 dXzyyOVLF3TE31nkmVcUuO3HOJGYy/qY+GoGHgNkwT9hl7kaJ+ZzqHtH1ygc01EQ
 5Ry832+RkNVSu8uwFywjIqOrjlvirgJP6T0XSK2u7KLNNcPBD5RrIKVEdwthhCps
 pt6hjzTKO08f558ROPjFPnzJdz7H938esuCCivgJT0IsX2Z/k8L7DBVjT6jZuriW
 +OsQxjYM1+6AJipC9QeB9SCV619N1xDGjvrsP/GxqFqdmbxdKpNkP5563KgRmI93
 +CByLOHXApMrk0Kwq4fEoto5cCyyUbzFLtRwzjPc565ULjGIjuKFOcxzmOXJLy1k
 6NTA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:sender:subject
 :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender
 :x-sasl-enc; s=fm1; t=1700892725; x=1700979125; bh=NSLXaXJxni6aa
 UKYM1oNuGzr6nC3clwUmpKDFA0Sq/M=; b=AoQjiAFRE4DKPipfEaFIVN3lAZEWF
 gi94I8yGUWieTAfq2VuGV1xHnzyNesKj365plSJxwqSNrMDW+MnsUdQjAEqAJBP0
 lNwFxmFBSByayDjFoc6S0wxZA6HwfHeSJmzttxUUsJUjQf0LtzS+KhuNl1rhihA/
 kXarfcTQ+J9PZzkVDcG4zOsLsyBkAQIgTPoRnJ0AzWZTP4YgitFB0L8Y6AfDIIo7
 0RI/V43f8HBh/IoSrNtrbAcy9LyeSGN28HhKeyCNGp5PJ4MlmDLlQBn7yeoLX46L
 9Df5EvSKqz0RD3dyWzkyZe82kFVLHZ9b6CpJUFZIz4p3iqjrMg+hn6Lag==
X-ME-Sender: <xms:NJBhZdTuZww5vQb_eq3Wkmj5vtc2tbhLQhYTaeL-NXpgMeJdw2ZeGg>
 <xme:NJBhZWxEOfSEDWBCeRyaD6aRkZE4vooel3upQImpxKILxlI9G8q8l5iOhp4jVX4De
 KGmckptVNdwAXcUIQ>
X-ME-Received: <xmr:NJBhZS2CyyLGUDX4-R4nRnog8pmej9OKJpP8SrmtpfWxdaLpyUP9xfHK>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudehiedgleehucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufhffjgfkfgggtgesthdtre
 dttdertdenucfhrhhomhepjghutghhvghnucfrvghiuceoihguseihphgvihdrohhrgheq
 necuggftrfgrthhtvghrnhepkeeiveefhedvheeufedvgfelueehieejtefgleevjeetue
 ekgfetgeehledvleetnecuffhomhgrihhnpeihphgvihdrohhrghenucevlhhushhtvghr
 ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehiugeshihpvghirdhorhhg
X-ME-Proxy: <xmx:NJBhZVBH-vM8joCpvMmLJJGJY95kBblFWHYpg4TlOy2CkTTP5DkMDA>
 <xmx:NJBhZWgBphdEQyYQ1m55cZUEQgnnz5EOwjPVkz6z4q0emJJruFGT1A>
 <xmx:NJBhZZqluDNxJL7-uEN3tLj5wvjCN38Hakh2WFlhXEMM6_Tj27ofBA>
 <xmx:NZBhZccYQXRTv77s1gYS1UXdpJXwtTLckHuspEGmxiISfSMDuAwAoA>
Feedback-ID: i51b146f9:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA for
 <67326 <at> debbugs.gnu.org>; Sat, 25 Nov 2023 01:12:03 -0500 (EST)
From: Yuchen Pei <id@HIDDEN>
To: bug#67326 <67326 <at> debbugs.gnu.org>
Subject: Re: bug#67326: 28.1.90.1; time-stamp slowdown in large org file
 after org-refile-get-targets, caused by e7b5912b23 (Improvements to long
 lines handling)
References: <87o7fn9txn.fsf@HIDDEN>
Date: Sat, 25 Nov 2023 17:11:59 +1100
In-Reply-To: <87o7fn9txn.fsf@HIDDEN> (Yuchen Pei's message of "Tue, 21 Nov
 2023 23:23:16 +1100")
Message-ID: <878r6m745s.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 67326
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

retitle 67326 29.1.90.1; time-stamp slowdown in large org file after org-refile-get-targets, caused by e7b5912b23 (Improvements to long lines handling)
thanks
> [... 66 lines elided]

Best,
Yuchen

--
Dr Yuchen Pei | https://ypei.org | Timezone: UTC+11
PGP Key: 47F9 D050 1E11 8879 9040  4941 2126 7E93 EF86 DFD0
https://ypei.org/assets/ypei-pubkey.txt




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#67326; Package emacs. Full text available.
Merged 67326 67327 67330. Request was from Eli Zaretskii <eliz@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 67326 <at> debbugs.gnu.org:


Received: (at 67326) by debbugs.gnu.org; 21 Nov 2023 14:31:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 21 09:31:58 2023
Received: from localhost ([127.0.0.1]:55584 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1r5RnC-0001L5-7T
	for submit <at> debbugs.gnu.org; Tue, 21 Nov 2023 09:31:58 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:60642)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1r5RnA-0001Ks-Fv
 for 67326 <at> debbugs.gnu.org; Tue, 21 Nov 2023 09:31:57 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1r5Rn2-0005tk-8k; Tue, 21 Nov 2023 09:31:48 -0500
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=jZAJxMiEbw6nEvCf3CDC37bcrc+2zrBSoAQ5QdtpAOQ=; b=asDLtqKIzFZY
 eD1CFouycArA/1o3etwvX7WXQ/PgS2qbDPe+jEPElURjYf+SN3r3IbawNRhCSmcYDCJx1WqrpVDWb
 X0/cEDbly4A/o6U4oex/jXr6PHZb5WCwZ/yjwN9WoHk/vpCDnZTv2MSYetWCY7wwUT8eo44VZor5s
 T576+ym9anore01/BFo8DnhvfXog67TzvoF6jO8egLIjl0rT5wIJvm/boDVbiiFn/+a7EHdDP76hw
 uhaD4Rnu0rlOHfhOg1N+imhuOMd0f8T9l/nYutiuUQflcQRP9phdOdMbA8KzAoKqe0+8mBF12fcjD
 RCeMNo2hahxum25vrjNBSQ==;
Date: Tue, 21 Nov 2023 16:31:22 +0200
Message-Id: <83wmubgoud.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Yuchen Pei <id@HIDDEN>, gregory@HIDDEN
In-Reply-To: <87o7fn9txn.fsf@HIDDEN> (message from Yuchen Pei on Tue, 21 Nov
 2023 23:23:16 +1100)
Subject: Re: bug#67326: 28.1.90.1;
 time-stamp slowdown in large org file after org-refile-get-targets,
 caused by e7b5912b23 (Improvements to long lines handling)
References: <87o7fn9txn.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 67326
Cc: 67326 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Yuchen Pei <id@HIDDEN>
> Date: Tue, 21 Nov 2023 23:23:16 +1100
> 
> 
> Previously reported in emacs-devel at
> https://lists.gnu.org/archive/html/emacs-devel/2023-06/msg00113.html
> 
> Emacs built with
> 
> ./configure --with-native-compilation --with-imagemagick --with-json
> 
> Possibly related to bug#57207
> 
> Set up: foo.org is a 12MB file, longest line 4753, about 21000
> headlines. It contains the timestamp thingie "Time-stamp: <....>" as one
> of the first few lines that already has a timestamp from before. Say the
> following file is called bar.el
> 
> #+begin_src emacs-lisp
> (add-hook 'before-save-hook 'time-stamp)
> (require 'org-refile)
> (setq org-refile-use-cache t)
> (setq org-refile-use-outline-path t)
> (setq org-refile-targets '((nil :maxlevel . 5)))
> (setq org-goto-interface 'outline-path-completion)
> (setq large-file-warning-threshold 15000000)
> (find-file "foo.org")
> (org-refile-get-targets)
> #+end_src
> 
> To reproduce, do
> 
> ./src/emacs -Q -l bar.el foo.org
> 
> followed by eval
> 
> (time-stamp)
> 
> It will take 10+ seconds to complete, and 10+ seconds if I undo
> afterwards.
> 
> Like bug#57207,
> 
> (setq long-line-threshold nil)
> 
> is a workaround, and (time-stamp) completes instantly.

Adding Gregory to the discussion.

> I could not measure the precise time or have the whole process run in
> batch mode because:
> 
> 1. It does not affect batch mode, presumably because of the change has
>    to do with x display
> 2. (time-stamp) has funny pseudo-asynchronous behaviour: if I do
>    (progn (time-stamp) (message "Done.")) the message evals immediately,
>    long before time-stamp "completes" and unhangs emacs.

I think you misinterpret what happens: what takes a long time is not
time-stamp, but the redisplay after it.  IOW, it isn't the evaluation
that takes time, it's the redisplay after it.  But maybe I'm missing
something.

> BTW what is the commit that fixed bug#57207? I searched for commits in
> master and emacs-29 with message containing 57207 but could not find
> any.

It's 1c837c42c2, I think.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#67326; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 21 Nov 2023 14:16:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 21 09:16:46 2023
Received: from localhost ([127.0.0.1]:55539 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1r5RYT-0000w1-4y
	for submit <at> debbugs.gnu.org; Tue, 21 Nov 2023 09:16:45 -0500
Received: from lists.gnu.org ([2001:470:142::17]:58088)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <id@HIDDEN>) id 1r5Pmx-0000z1-R2
 for submit <at> debbugs.gnu.org; Tue, 21 Nov 2023 07:23:36 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <id@HIDDEN>) id 1r5Pmp-0007Bt-SB
 for bug-gnu-emacs@HIDDEN; Tue, 21 Nov 2023 07:23:27 -0500
Received: from wout2-smtp.messagingengine.com ([64.147.123.25])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <id@HIDDEN>) id 1r5Pmn-000462-JX
 for bug-gnu-emacs@HIDDEN; Tue, 21 Nov 2023 07:23:27 -0500
Received: from compute2.internal (compute2.nyi.internal [10.202.2.46])
 by mailout.west.internal (Postfix) with ESMTP id 887E932014B9
 for <bug-gnu-emacs@HIDDEN>; Tue, 21 Nov 2023 07:23:22 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163])
 by compute2.internal (MEProxy); Tue, 21 Nov 2023 07:23:22 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ypei.org; h=cc
 :content-type:content-type:date:date:from:from:in-reply-to
 :message-id:mime-version:reply-to:sender:subject:subject:to:to;
 s=fm2; t=1700569402; x=1700655802; bh=H9aIl3yYFb9/jLRZmBMRx2q2+
 0tpKvk1+OJZFMzGNS0=; b=B0nnabYXzHFug3YA+5nSnkSUuQ/2kTxbzGJqcGGl9
 yskNTO5eWHIYm8jIx3b23A1r1V6r5+GTnkIE6CtfFAQomp7NuQ3CJq0VnmeD203o
 Wh3WE+DvYgj/jvfqNJCv8/DG4H4uffIYjqyrrKv7sUhgl10u8y+r6DKS764UYaRW
 l7zghDkMh97WHOGMFyARUkpQrnfNK3SGTPBarHxJdfIlXos+TD5m7MBdtkLCKauJ
 UFTJZW9qjqxQLnlDQgJPTN3EclEvPbmx9Xn8CWXGEDDhdT1hWfMjKU3V5QuvPACU
 TG+1QCcHDljv3zcMwdNPPkAdory7sGRFs9vr6pHsDQiDg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:message-id
 :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=
 1700569402; x=1700655802; bh=H9aIl3yYFb9/jLRZmBMRx2q2+0tpKvk1+OJ
 ZFMzGNS0=; b=DcmvNr55TSyofw16ocJZI7J1Id0dlQva2p9bnPC25y3Lh3BLYgv
 q+iaLWMviXXg4NQi6DyBGeW2HLHSzndty+M+wST0X2qgYhC4e6vtG/8krVk+qVfr
 BRed7DmQTgvT+vQwqhP4IxooHrZ1tCfVf5IEPtWIzeXjTaCQEMkfZtMaN/MNIFte
 Nj/lv5gVIHTtJPDnmi7KP1+fTwTipuV2nB+PAJE8WA8WwaZNj6Xeo8v5ZywsqQLG
 mfE3JR6C1/6NPO1JR4O+nVDX9zqzXX8JT/9A5MSRljHhm2urB2NJVoPHZZfz1ZAZ
 zg3sNR3E5JOilZujiSJeFcd6T6ieU9hzJrA==
X-ME-Sender: <xms:OaFcZcETjWNaOpusWt7mdIztXqZRJL7aALvmklbb8X4CDtTPTZKp4g>
 <xme:OaFcZVXrsv7fJbZHn4lLUul-jc3PdGUKPozxymFeh4o0tSzKl5S8qHhSShEsY-SN0
 jCoZ4VYTAhmJRTGYg>
X-ME-Received: <xmr:OaFcZWLpWNGd1DjaHKuSJE1Bs4mslpNNUicqG1HM4irhtduuAU1RzlL4>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudegledgfeefucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkfgggtgesthdtredttd
 ertdenucfhrhhomhepjghutghhvghnucfrvghiuceoihguseihphgvihdrohhrgheqnecu
 ggftrfgrthhtvghrnhepfeekgedutdfgveefleefudetuddvhfdvfeevtdelvddvvdevke
 fhtdeftdevuedunecuffhomhgrihhnpehgnhhurdhorhhgpdihphgvihdrohhrghenucev
 lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehiugeshihpvg
 hirdhorhhg
X-ME-Proxy: <xmx:OaFcZeHWxGvNrVE0entZAXmMY5b-_hgN4qP0lmmu6d4nhnA-crrzuw>
 <xmx:OaFcZSVojS0M0ecDPTzuOU_8cWvBuu6M7_BXCZm5AZ1cAmGG-LXXPA>
 <xmx:OaFcZRMyyQngXgzCPd31DrY0eC06YYsla1dx595BHSKUhk9CjqrUgw>
 <xmx:OqFcZdBTRzPqePMEuo2LWHumDsPA-cuwu7BYVJJgEHJAPMEexZ4BGw>
Feedback-ID: i51b146f9:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA for
 <bug-gnu-emacs@HIDDEN>; Tue, 21 Nov 2023 07:23:20 -0500 (EST)
From: Yuchen Pei <id@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 28.1.90.1; time-stamp slowdown in large org file after
 org-refile-get-targets, caused by e7b5912b23 (Improvements to long lines
 handling)
Date: Tue, 21 Nov 2023 23:23:16 +1100
Message-ID: <87o7fn9txn.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=64.147.123.25; envelope-from=id@HIDDEN;
 helo=wout2-smtp.messagingengine.com
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 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,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001,
 SPF_HELO_PASS=-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: 0.6 (/)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Tue, 21 Nov 2023 09:16:42 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)


Previously reported in emacs-devel at
https://lists.gnu.org/archive/html/emacs-devel/2023-06/msg00113.html

Emacs built with

./configure --with-native-compilation --with-imagemagick --with-json

Possibly related to bug#57207

Set up: foo.org is a 12MB file, longest line 4753, about 21000
headlines. It contains the timestamp thingie "Time-stamp: <....>" as one
of the first few lines that already has a timestamp from before. Say the
following file is called bar.el

#+begin_src emacs-lisp
(add-hook 'before-save-hook 'time-stamp)
(require 'org-refile)
(setq org-refile-use-cache t)
(setq org-refile-use-outline-path t)
(setq org-refile-targets '((nil :maxlevel . 5)))
(setq org-goto-interface 'outline-path-completion)
(setq large-file-warning-threshold 15000000)
(find-file "foo.org")
(org-refile-get-targets)
#+end_src

To reproduce, do

./src/emacs -Q -l bar.el foo.org

followed by eval

(time-stamp)

It will take 10+ seconds to complete, and 10+ seconds if I undo
afterwards.

Like bug#57207,

(setq long-line-threshold nil)

is a workaround, and (time-stamp) completes instantly.

I could not measure the precise time or have the whole process run in
batch mode because:

1. It does not affect batch mode, presumably because of the change has
   to do with x display
2. (time-stamp) has funny pseudo-asynchronous behaviour: if I do
   (progn (time-stamp) (message "Done.")) the message evals immediately,
   long before time-stamp "completes" and unhangs emacs.

BTW what is the commit that fixed bug#57207? I searched for commits in
master and emacs-29 with message containing 57207 but could not find
any.

Best,
Yuchen

--
Dr Yuchen Pei | https://ypei.org | Timezone: UTC+11
PGP Key: 47F9 D050 1E11 8879 9040  4941 2126 7E93 EF86 DFD0
https://ypei.org/assets/ypei-pubkey.txt




Acknowledgement sent to Yuchen Pei <id@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#67326; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 20 Jan 2024 12:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.