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.devel Subject: 29.0.91 756244c696 Saving large org file can be slow with time-stamp before-save-hook Date: Sat, 03 Jun 2023 21:33:54 +1000 Message-ID: <87ilc4ok4d.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="38719"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 03 13:34:36 2023 Return-path: Envelope-to: ged-emacs-devel@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 1q5PWk-0009ts-0K for ged-emacs-devel@m.gmane-mx.org; Sat, 03 Jun 2023 13:34:35 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q5PWN-0000jd-MX; Sat, 03 Jun 2023 07:34:11 -0400 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 1q5PWL-0000jV-7l for emacs-devel@gnu.org; Sat, 03 Jun 2023 07:34:09 -0400 Original-Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q5PWJ-0005Q9-70 for emacs-devel@gnu.org; Sat, 03 Jun 2023 07:34:08 -0400 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 5FEDB3200947 for ; Sat, 3 Jun 2023 07:34:01 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Sat, 03 Jun 2023 07:34:01 -0400 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=1685792040; x=1685878440; bh=2R/uFKlsrSMY857Q2LHdB1bDa 3yQ85j0pQFRU7MJ16U=; b=qzuuEpHkqNghtSK77EichgB5qLEAYvCank5fkIHs9 Vk0qJIRdrPIfJlC/SyJiUGltB1ztIis374++Q1e5o4/UEBYTZa1r9gIvEkmFb+jr FfQurSQ0ZjBbzM9KEuot1anDrZ5kuqsiGbgQd4KcRGBod/hZaBFc7OMVI1+CjJr6 eWZGLDWhilnakKsx0dyN8QV28xeefZuObB00g/w/0coPZjP7Oy+wSjSg7oXt6rSx fUe75JcLYtioQINlTQR4Z3ibo/JyrakGz1913nxAMxCiObewp5I1tE8YoVGn16Sp KAD1YtPCOQacozMYuURtVlSL0CBDKnqLhyo4Rssdwfm5w== 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= 1685792040; x=1685878440; bh=2R/uFKlsrSMY857Q2LHdB1bDa3yQ85j0pQF RU7MJ16U=; b=RgloHTXLd9KbtzN1JdBb2zPA2XHKr73WyAiUYFguzClf+bKLyto 3Hu3vCCIO4yxNjmG13zeK2bLKt68Sh042pZ/nCxJafPYj6r/MeZR6BtkB3I95jZr 7V5R5fO0b/++FwFDW/5m4y/muiyCIhpm0atGah1I2xprlKFF1A6qGBAlH9bbpcV5 tjlYdLQE41LgU3xMilkEZIsr7EBGB1eAAj2nIUC25JLYM4DKW/xlKmeyW2xYBIL+ W1mWMKv5+A+WKCodr5AD25gbrztFTasPMjHrqmCCs+A3UeLvYoRsKOFyMF2cpYGF wp8iNNWvaRuc6T0XilFYZrQrQkTKbP8zjpg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeelhedggedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkfgggtgesthdtredttd ertdenucfhrhhomhepjghutghhvghnucfrvghiuceoihguseihphgvihdrohhrgheqnecu ggftrfgrthhtvghrnhepjeejudegteeifeevfedtffduheelhfdtleffgeelleeffedtke fgjeeiueejheehnecuffhomhgrihhnpeihphgvihdrohhrghenucevlhhushhtvghrufhi iigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehiugeshihpvghirdhorhhg X-ME-Proxy: Feedback-ID: i51b146f9:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sat, 3 Jun 2023 07:33:59 -0400 (EDT) Received-SPF: pass client-ip=64.147.123.19; envelope-from=id@ypei.org; helo=wout3-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, 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-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:306586 Archived-At: emacs-29 756244c69638bc3562d8cd2c1aa126216e99fb29 build. Not sure how to reprod with something from scratch. But here are the steps to reprod with a large "organic" org file with emacs -Q - (add-hook 'before-save-hook 'time-stamp) - Open a very large org file with a "Time-stamp:" at the beginning of the file - (setq org-refile-use-cache t) - (setq org-refile-use-outline-path t) - (setq org-refile-targets '((org-agenda-files :maxlevel . 5))) - (setq org-goto-interface 'outline-path-completion) - M-x org-goto, which triggers `org-refile-get-targets`, wait for it to finish - Make a minimal change to the file, e.g. add a space then delete it. - M-x save-buffer / C-x C-s - and it takes too long to save The problem disappears if I remove the hook or do not run org-goto and trigger generation of the cache, and the problem does not manifest in 28.2 either. Best, Yuchen -- PGP Key: 47F9 D050 1E11 8879 9040 4941 2126 7E93 EF86 DFD0