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#67330: 29.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:32:23 +1100 Message-ID: <87cyw39tig.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="28179"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) To: 67330@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:18 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-00072d-St 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 1r5RYm-0006uZ-Td; Tue, 21 Nov 2023 09:17:05 -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 1r5RYk-0006tV-Tz for bug-gnu-emacs@gnu.org; Tue, 21 Nov 2023 09:17:02 -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 1r5RYk-00021U-LM for bug-gnu-emacs@gnu.org; Tue, 21 Nov 2023 09:17:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r5RYn-0000yI-AZ for bug-gnu-emacs@gnu.org; Tue, 21 Nov 2023 09:17:05 -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:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67330 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs Original-Received: via spool by submit@debbugs.gnu.org id=B.17005762143643 (code B ref -1); Tue, 21 Nov 2023 14:17:05 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Nov 2023 14:16:54 +0000 Original-Received: from localhost ([127.0.0.1]:55547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r5RYb-0000wc-Ij for submit@debbugs.gnu.org; Tue, 21 Nov 2023 09:16:53 -0500 Original-Received: from lists.gnu.org ([2001:470:142::17]:56262) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r5Pvq-0003o3-HV for submit@debbugs.gnu.org; Tue, 21 Nov 2023 07:32:47 -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 1r5Pvd-00016v-Va for bug-gnu-emacs@gnu.org; Tue, 21 Nov 2023 07:32:34 -0500 Original-Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r5Pvb-0006Qg-Ol for bug-gnu-emacs@gnu.org; Tue, 21 Nov 2023 07:32:33 -0500 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 6AC703200F31 for ; Tue, 21 Nov 2023 07:32:29 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 21 Nov 2023 07:32:29 -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=1700569948; x=1700656348; bh=Z4E7OCnRdNosj+esQIuSqyrY9 irK3Y5alw8f8QTOFHQ=; b=fx0WBCZ5Cbh4mwC0XTWXVt76bR/CclXNFPrvNZwqg 4Y23RrXFoVwVIGl631/LJ/0DU0kVviOHDdgtjEB/L7TUTStDvYLXfJzHUZop7dQr a871/71sh+VGTTdkNKEoraaJFp97IIwEdoCiRRZy/rbNCCqD5DwsL/Xy16GZ86ta K//Eg50d4gWtQKSS2OU91glJYaTpSdVh+dzKAXZfMaITgz6fw7Sly6Pv5/pnAuvk WsWPgOnWXeDI9orFDVTOnq4cMLeANYEhMiRZeXH13N7LniB78kBCse8Xbkrf0zNc KEJqUKmT+2DSwwY+YdUXZqrmQJSoobhzvhEl2L5UEgteA== 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= 1700569948; x=1700656348; bh=Z4E7OCnRdNosj+esQIuSqyrY9irK3Y5alw8 f8QTOFHQ=; b=wPH5BAyqsk51y8Ngp/FfL4TvcHznjc3RMqgo+hNRJl5A3yBnZ/e ycI6tvyjoLaAW5j8rzQzMCXI4ieWqjhkYrUSGUkBSEC2ornNnl3QeYBfb/s/zA8n luOnVDGKOvc9mqpBgIqjOFpBVT9KZ41e6UCut3GO4Eq9EkfjNSTAYYreT3/S2Tpq 6PcFwkfSa/LX2yL61XJ1VBx9xIp00M4MOJyXH2SM/ulTxHOB6ElsQrdq/8kD0a8E Y7METr9cq5Or31SiTdAWJx6GUISpGH4yIa7uM9O2VB8Y1ME7TSyFUc7vVSewrLz7 d8LSNqXEnDsuCYo9DGH9AlUi7a3vpE+EUPA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudegledgfeehucetufdoteggodetrfdotf 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:32:27 -0500 (EST) Received-SPF: pass client-ip=64.147.123.20; envelope-from=id@ypei.org; helo=wout4-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_H5=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:274725 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