From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:1008:1e59::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id EK0jLp2QY2Zn+wAAA41jLg (envelope-from ) for ; Sat, 08 Jun 2024 00:58:37 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 2MhCJp2QY2aZrQAA62LTzQ (envelope-from ) for ; Sat, 08 Jun 2024 00:58:37 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=christianmoe.com header.s=x header.b=BFO8vzMY; 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=fail reason="SPF not aligned (relaxed)" header.from=christianmoe.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1717801117; 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=00+eAXauPk1MdXPpHJSWf4a6kAd4WolGCJnXiPbh0hE=; b=qrlPjEFN1i4b//TFJL7rrl4Wu/zcN1ypoS4lrRFZSjHNvD2WjBcS1ItbThNLfahTDunZLD 1864hIOPWpAqnTmur/1pzJtRIJ9AFaFb0VTWRrn9jf2XsB2IOGUs6PKb/JjCYXOprf2pGo y/kyjororED8/IJZwRkQg1FlFKAqXa8tYEiapqmOeP11U1Ox+wWDoxvWhpw0MDSl/fANQc m6/7yNGj6aj++6Q3nCLCH+uCmIURInEZOcPlQ5NZbGOOotffUG1XJmS618QTD3UIUoZGlM 1i+avGCfPdYruv/aNbror8W9e7oWGMgqZW3vvoNJWW+SpU73ObwFAyymp2FOQw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=christianmoe.com header.s=x header.b=BFO8vzMY; 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=fail reason="SPF not aligned (relaxed)" header.from=christianmoe.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1717801117; a=rsa-sha256; cv=none; b=ExtwIGw6C/08I23kRoXQygsrO0ESuOH9L4iDGZiFI0wBkPnCSV68zy+Kketnab0PihrpTW U3d1GhvH6yBHemfkrM68aLTFB4NI0hHojW92dR2x0GXjJmaZ5/G46Kd/0uLvZpsO3zg2md rYMiYWp4HfNwCr4/CCkHFdfIPn9o8qUml2PreCykB+c4HH62UMKrcE+E4ioMQN1J5JeNWH IF8bFHQGwM3wH+1PN0bixlXf/yq5Nq8ajB/aN0X1tluNzxKyhB5VfG3Is4d1X5fsOSmSUn az714sGzpQSiwWMKx1NN3zYeuu5znZa5RTK3DjukAGXFvP2ZxKvIuE8ldbCvDQ== 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 548FC50513 for ; Sat, 8 Jun 2024 00:58:37 +0200 (CEST) Received: from [::1] (helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sFdyE-0000JK-Ka; Fri, 07 Jun 2024 14:05:46 -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 1sFdyC-0000IS-Sy for emacs-orgmode@gnu.org; Fri, 07 Jun 2024 14:05:44 -0400 Received: from mailer-211-161.hitrost.net ([91.185.211.161]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sFdyA-0006iH-Pg for emacs-orgmode@gnu.org; Fri, 07 Jun 2024 14:05:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=christianmoe.com; s=x; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:In-reply-to:Date:Subject:Cc:To:From:References:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=00+eAXauPk1MdXPpHJSWf4a6kAd4WolGCJnXiPbh0hE=; b=BFO8vzMYWREwAWqReYZwRZxjQH emAXqf1HKrRF/EcQlVmhr5CsshTH7Bf3O8SFjJuNCqIbTU9xT7aAAkM3xleX4hDv/4e3i+NNEDf+u QlOYrmnlbIjGrh/92n9k5kWvkalnPpGvLTtplIuubVW4IUvl7M8FoHrLKPuqkhUkQAct0rl8YPKAx upvfEBYnkIxkRww9jMyscZOCIKWLXosxEC4NFAQwkupDc7C6gTPCmbSAZ7+rN1CybRC3pdN30Trz4 q9kkuFzfEmcYpa2gj9pte/ZzUke+/MDwz+fJElKQ0cJWunv0IHKH5Qy/72Z1ky9b9W6jxIcyh6u8R nDI/p1iQ==; Received: from 46-182-228-59.dynamic.telemach.net ([46.182.228.59] helo=MacMint) by b1.hitrost.net with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.97.1) (envelope-from ) id 1sFdy7-0000000GM0f-0rME; Fri, 07 Jun 2024 20:05:39 +0200 References: <87wmn28rqf.fsf@christianmoe.com> <87wmn2gl2j.fsf@localhost> <8734pooptt.fsf@christianmoe.com> <87le3g93wi.fsf@localhost> User-agent: mu4e 1.6.10; emacs 27.1 From: Christian Moe To: Ihor Radchenko Cc: Christian Moe , emacs-orgmode@gnu.org Subject: Re: Very slow getting tags for completion after 9.7 upgrade Date: Fri, 07 Jun 2024 20:02:04 +0200 In-reply-to: <87le3g93wi.fsf@localhost> Message-ID: <87plsszkzx.fsf@christianmoe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-GeoIP: Country [IP], SI [46.182.228.59] X-Authenticated-Id: mail@christianmoe.com Received-SPF: pass client-ip=91.185.211.161; envelope-from=mail@christianmoe.com; helo=mailer-211-161.hitrost.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, 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-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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 2.66 X-Spam-Score: 2.66 X-Migadu-Queue-Id: 548FC50513 X-Migadu-Scanner: mx13.migadu.com X-TUID: Potde+3bW/nO Ihor Radchenko writes: > 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. Looks like that did the trick! Even in the monster file, I'm now down to 1.6 seconds, which is absolutely fair given the size of the file. Thanks for the advice! Yours, Christian