From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuchen Pei Newsgroups: gmane.emacs.bugs Subject: 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) Date: Tue, 21 Nov 2023 23:23:16 +1100 Message-ID: <87o7fn9txn.fsf@ypei.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28087"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) To: 67326@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 21 15:17:17 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r5RYy-00071B-4N for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 21 Nov 2023 15:17:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r5RYl-0006u8-GB; Tue, 21 Nov 2023 09:17:03 -0500 Original-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 1r5RYj-0006tC-7f for bug-gnu-emacs@gnu.org; Tue, 21 Nov 2023 09:17:01 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r5RYi-00020c-AC for bug-gnu-emacs@gnu.org; Tue, 21 Nov 2023 09:17:00 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r5RYk-0000xM-Uy for bug-gnu-emacs@gnu.org; Tue, 21 Nov 2023 09:17:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Yuchen Pei Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Nov 2023 14:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67326 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.17005762063607 (code B ref -1); Tue, 21 Nov 2023 14:17:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Nov 2023 14:16:46 +0000 Original-Received: from localhost ([127.0.0.1]:55539 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r5RYT-0000w1-4y for submit@debbugs.gnu.org; Tue, 21 Nov 2023 09:16:45 -0500 Original-Received: from lists.gnu.org ([2001:470:142::17]:58088) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r5Pmx-0000z1-R2 for submit@debbugs.gnu.org; Tue, 21 Nov 2023 07:23:36 -0500 Original-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 1r5Pmp-0007Bt-SB for bug-gnu-emacs@gnu.org; Tue, 21 Nov 2023 07:23:27 -0500 Original-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 1r5Pmn-000462-JX for bug-gnu-emacs@gnu.org; Tue, 21 Nov 2023 07:23:27 -0500 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 887E932014B9 for ; Tue, 21 Nov 2023 07:23:22 -0500 (EST) Original-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: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudegledgfeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkfgggtgesthdtredttd ertdenucfhrhhomhepjghutghhvghnucfrvghiuceoihguseihphgvihdrohhrgheqnecu ggftrfgrthhtvghrnhepfeekgedutdfgveefleefudetuddvhfdvfeevtdelvddvvdevke fhtdeftdevuedunecuffhomhgrihhnpehgnhhurdhorhhgpdihphgvihdrohhrghenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehiugeshihpvg hirdhorhhg X-ME-Proxy: Feedback-ID: i51b146f9:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Tue, 21 Nov 2023 07:23:20 -0500 (EST) Received-SPF: pass client-ip=64.147.123.25; envelope-from=id@ypei.org; 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-Mailman-Approved-At: Tue, 21 Nov 2023 09:16:42 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:274724 Archived-At: 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