From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id SAqWF3aXY2bHFgAAe85BDQ:P1 (envelope-from ) for ; Sat, 08 Jun 2024 01:27:50 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id SAqWF3aXY2bHFgAAe85BDQ (envelope-from ) for ; Sat, 08 Jun 2024 01:27:50 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=icOZbCRl; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1717802870; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=l8IERXQ6QZhMvg8Fb1SZngG4nq5k31f71jcYJP4L7rQ=; b=oUIzN/89iUamatSO1GHMeZnZwQiSoN+W59oD0Tfbwkjyf8rJFqOMrk7XUVGp2rMqbsl3Q4 2M22SkIxJpTs7Bh0k8xfRNdX+UoxdKAWyvfgwNWaYQcqgvmdPtquvGxtD7dVuCmru63Xgc cayA7UkI3IOlDbQAJnRsP+eRKQy7Pb8FVX+hyTndpQB5yW07t4rxK237K+TjA8bVsLHvJ0 ONTt27iDZPVBqI3RsbzrGxK67ocw8sxHEF8ssFBBrXb9CjPjr6Q0F0dAkLZ4YVo1dSDDCl NNYpsQNUyJAilt6DK81y2LMv2qVrA/YATbL7e+CopuOUjYRqPHf2d0uHdwrxeA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=icOZbCRl; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1717802870; a=rsa-sha256; cv=none; b=ZG+9cbXwLn8CwWXyk/eMNusaJLjZh5cRcypsa4VdMFzn3TqKVhP4frOl6wxNbn2khyM5Ek Jiy3T2WKHqyEd2eHP4++GcxH23qwsWkdS/jni7vQHZTFpW8xc6DHWaN7QNwtNsQ131VW3a LvCNlByBaTfUkk/lYgYKAODcA8dftn2o5j+GxE7wuVxwf7HMYUViqkWf/1/j8zxFbUR2+V 9tCs0IZEFM+HiPHYy7OrMH18S449AT2i7HfNt+nH4JzXExX8Shs4PeE8WA6aJ+aXXz3TUo KBGIVK7ScfIFbwXF4o8MAZPng4DubAeLUp97F88P4QP3hpb7eYDAcWqdKOoazw== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id DF6656A6F7 for ; Sat, 8 Jun 2024 01:27:49 +0200 (CEST) Received: from [::1] (helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sFbLh-0003ZO-Dj; Fri, 07 Jun 2024 11:17:49 -0400 Received: from [2001:470:142:3::10] (helo=eggs.gnu.org) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sFbLg-0003ZA-9U for emacs-orgmode@gnu.org; Fri, 07 Jun 2024 11:17:48 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sFbLd-00038i-WE for emacs-orgmode@gnu.org; Fri, 07 Jun 2024 11:17:48 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 3F372240103 for ; Fri, 7 Jun 2024 17:17:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1717773464; bh=l8IERXQ6QZhMvg8Fb1SZngG4nq5k31f71jcYJP4L7rQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=icOZbCRlrnxZzezJ4HO/maWVhNHB1Na97DChu846S4xgjAkEpVK7o4cD4QMYTRzZc xVCzcPyX5e+H6UNmQAKj78KKbDJp4h+GNPa87/Rpwb54k5Z7jx5SWglvnhYw596cdj PIOYy/nPKuUxORDrEqFnZc1ouNwcSuY9cNLt72SO/idxRzHsoQIq2CAHBy4FyKrZJa yElUP0rCHBwFt0XNHpwGYSWWCvs1DglQUChq1RQ5QTxRo+NPIEfPw5H5ZSnsbv3u2l bMd8+ICG0BR4Yy+/045nVc2ISEpGZSJ83ljXRdluP/C21S0vVqsV8Ss9VWBPH9BqJA USlzSpAeH+agg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4VwlF36CLyz6txg; Fri, 7 Jun 2024 17:17:43 +0200 (CEST) From: Ihor Radchenko To: Christian Moe Cc: emacs-orgmode@gnu.org Subject: Re: Very slow getting tags for completion after 9.7 upgrade In-Reply-To: <8734pooptt.fsf@christianmoe.com> References: <87wmn28rqf.fsf@christianmoe.com> <87wmn2gl2j.fsf@localhost> <8734pooptt.fsf@christianmoe.com> Date: Fri, 07 Jun 2024 15:19:25 +0000 Message-ID: <87le3g93wi.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -9.54 X-Migadu-Queue-Id: DF6656A6F7 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -9.54 X-TUID: u8Sx98drOczz Christian Moe writes: > Thanks! I attach a profile report (for a largeish file with 67 tags > across 1515 headings, 17K+ lines, 18=E2=80=9336 seconds wait to get tags). > > ... > I tried starting emacs with an empty .emacs file; it didn't solve the > problem, so I haven't located any problem in my config. (Starting emacs > with 'emacs -Q' did help - but only because it threw me back to built-in > org 9.3.) > > I experimented with generating simulated Org documents with varying > numbers of tagged headings (n=3D500, 1000, ... 5000) and doing > (benchmark-run (org-get-buffer-tags)) in them. The time needed to get > the tags seems to grow polynomially with n^2. The underlying also is NLogN, not N^2. And it cannot be avl-tree that shows up in the profile - avl-tree code is built-in and it is well-tested, with NLogN worst case complexity. What is fishy is that GC takes 80% of the time. It is not normal. May you try to clear ELPA directory completely, start emacs -Q, and install Org mode? Just to make sure that there are no issues with mixed compilation. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at