From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id kJztEsPAX2TiHQEASxT56A (envelope-from ) for ; Sat, 13 May 2023 18:54:27 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 8C3oEsPAX2Q3KQEA9RJhRA (envelope-from ) for ; Sat, 13 May 2023 18:54:27 +0200 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 CFDF436E0 for ; Sat, 13 May 2023 18:54:26 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pxsV8-0005WP-Dh; Sat, 13 May 2023 12:53:46 -0400 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 1pxsV6-0005WA-V7 for emacs-orgmode@gnu.org; Sat, 13 May 2023 12:53:44 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pxsV5-0005tF-96 for emacs-orgmode@gnu.org; Sat, 13 May 2023 12:53:44 -0400 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1ab267e3528so79496485ad.0 for ; Sat, 13 May 2023 09:53:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683996821; x=1686588821; h=mime-version:in-reply-to:reply-to:date:subject:cc:to:from :user-agent:references:message-id:from:to:cc:subject:date:message-id :reply-to; bh=Sg8ZMeTiJyJJ/POlrVMtUvTtYAS5ZgvmZPkhC8Ywsi0=; b=rwB5/YXazHdUc/ZE/UQ3AOvJ0C8n29nFgGjLGPrO11s1+Bl3j8WklHniuLrGIJnQxb 0Bm46yM5zJXgwy9E7oTgtxyZVjkY5C2jpTn1RsVVOP+VMXVxTV9TEPGgtOOZG8UZ8iRD g51ywJQkvPXeKisUuYwqDpQpl/b2tsdCG6z2PI0RpqRR1qlfdDgCyQN3YNRXt5VahuVx f9X5wuxLIkK6hy8bv53bMRAjsQlIkU4k8XBEhWyjVnaIP1TqpNNWcBh07Cr2msw8zeLg MswobEMge/ZAZen6N6N/C85T0Jmw1/+RnNXevLyOiZzolPzZj3fDhRgWvbGNMsGeQFb2 xiHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683996821; x=1686588821; h=mime-version:in-reply-to:reply-to:date:subject:cc:to:from :user-agent:references:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Sg8ZMeTiJyJJ/POlrVMtUvTtYAS5ZgvmZPkhC8Ywsi0=; b=EBxUfui83ybjm9+qMsVsa6JNIYyYZ239VDz3ukIPJXmar4oeCETRV5+wzxbmvOyfAd fw5VBxXseQiUfLU/kFEGnSwiQdSZLiWj4yYVDQWl6292Cdtb7DDO4JDriJTFLWzFVusO xMSGPiA1Jq8qrZwzNnuiwp3d2+1ugRcHtBBz9NtpqOaTx7MwFwTY+EYqwvGrMr918ORa gsA3/46gMdTv4Cjm+viAzyDQJCNDy7APDJ4/KFsvO6cuLEDuayh22YkEuz42vr/NYI+1 mO5ooa8dCNFB4cTQV/CyNXbcRTOn7qSJMRCORVQBAfJ0hGooMVxt74i9s9+9Iqm6MHK7 RH7w== X-Gm-Message-State: AC+VfDzNNohrWsNNAjurOoYHtjVA9YvEMSBV7k8c12CO0SU0KN+1sHug CX/OmY10r3B68cq6H8fuoA== X-Google-Smtp-Source: ACHHUZ7RO8TWT3/ciy5RDiQRzzjXRJFFPSXQ5PrHpTHVWctOXZdj2d/yJwT7JPNL8zmnNM0caIW5cg== X-Received: by 2002:a17:902:9694:b0:1a9:8769:36bd with SMTP id n20-20020a170902969400b001a9876936bdmr29402115plp.36.1683996821553; Sat, 13 May 2023 09:53:41 -0700 (PDT) Received: from Mac-mini.local ([39.171.215.147]) by smtp.gmail.com with ESMTPSA id l11-20020a170903244b00b001aaed55aff3sm10039957pls.137.2023.05.13.09.53.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 13 May 2023 09:53:40 -0700 (PDT) Message-ID: <645fc094.170a0220.4d545.38e1@mx.google.com> X-Google-Original-Message-ID: Received: by Mac-mini.local (Postfix, from userid 501) id AC53D8D1B3A2; Sat, 13 May 2023 22:25:27 +0800 (CST) References: <878rds1xta.fsf@localhost> <87a5y8iiak.fsf@localhost> User-agent: mu4e 1.10.3; emacs 30.0.50 From: "Christopher M. Miles" To: Ihor Radchenko Cc: stardiviner , Org-mode Subject: [PATCH] Re: Improve the performance of `org-set-tags-command` on large `org-tag-alist` Date: Sat, 13 May 2023 22:24:32 +0800 In-reply-to: <87a5y8iiak.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=numbchild@gmail.com; helo=mail-pl1-x62f.google.com 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, FREEMAIL_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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: , Reply-To: numbchild@gmail.com 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 ARC-Seal: i=1; s=key1; d=yhetil.org; t=1683996867; a=rsa-sha256; cv=none; b=jFkh9EONryI0y6MwdTnSvPGsign9Nr6gMPe0xfauRRo/eQ3AHz5BZBA/F1aRkz4ij1JgI5 4jmgFZdkfa5u5IvhUohBz1+XAFMqI3Aa96fT25eZful+7jxfbtCNlFELJmhu7+hf8yx0Nz hukOwtD1OUm6ytzT1iAz9VVPOsmluER6j+CiGvawbpdtX9/Xd7n8uWxkbeOtb5uxhLlF4y 2yPRdrK2AZt9CbWjecPDvzyMhzPknfqdwqeTl9JG1eTCsmxKiUhPjIvraup9rJgYSKvGCS c0o7YuYXXjPM89yq/CSOQ/uWvcKwEVx+lnNHvt1tYiDfmgNQaWjHABeI+DiLlA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b="rwB5/YXa"; dmarc=pass (policy=none) header.from=gmail.com; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1683996867; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Sg8ZMeTiJyJJ/POlrVMtUvTtYAS5ZgvmZPkhC8Ywsi0=; b=C9etQRLdlViMfJY5QbrR10LLyHc0Wt+9SzZYYTZDyNDGhPAu6rYLCKjrhhrnEgA5lmXXvn AAAtB6zCjZAgEtzp2ItXPTlHglF4C15W3uxiotu/b1JbdrrBTVQcqttplIiwc8dG/4ECYJ o/bpXc0A3ej1ko/bkOzPtNezuF0d8xJJLbLov3LVksX7/8B5bncdih3Xe+vOv+nMTxfzNs GDSwuP99/7/WDWw4G8krkdDrhNQODeblBnvtwNil2SwkhdQ368Aaj9fs/TfJLKI+Asxznp zNDUHuqnHKdQNd0YWbOoeY3lOOujZCeDP7niiW9HYcbxiv8a3Q878QFkD3BChA== X-Migadu-Spam-Score: -12.09 X-Spam-Score: -12.09 X-Migadu-Queue-Id: CFDF436E0 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b="rwB5/YXa"; dmarc=pass (policy=none) header.from=gmail.com; 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" X-TUID: P0c7yhpkLjHg --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Ihor Radchenko writes: > stardiviner writes: > >> I applied your diff with a testing. This indeed solved the performance >> issue. >> Will this be updated in Org-mode source code? >> Also I come up with one thing, filter out tags which have shortcut >> keybinding bound. Because user defined shortcut key defined tags are not >> always on head of list. > > It would be great if you can come up with a patch. > 1. Keeping tags with explicitly assigned key binding indeed makes sense > 2. If we limit the number of displayed tags (on top of explicitly > assigned), it should be a defcustom. Here is the patch. --=-=-= Content-Type: #("text/x-patch" 0 12 (prescient-regexps nil prescient-ignore-case t)) Content-Disposition: attachment; filename=0001-org-Improve-the-tags-fast-selection-performance.patch Content-Transfer-Encoding: quoted-printable From=20649ca2215e98c59b9a9c16128448c6bb1def3b62 Mon Sep 17 00:00:00 2001 From: stardiviner Date: Sat, 13 May 2023 22:22:25 +0800 Subject: [PATCH] org: Improve the tags fast selection performance * lisp/org.el (org-fast-tag-selection): Filter out only short key bound tags for tag fast selection. =2D-- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index 542959f73..dfc15d134 100644 =2D-- a/lisp/org.el +++ b/lisp/org.el @@ -11935,7 +11935,7 @@ Returns the new tags string, or nil to not change t= he current settings." (org-fast-tag-insert "Current" current c-face "\n\n") (org-fast-tag-show-exit exit-after-next) (org-set-current-tags-overlay current ov-prefix) =2D (setq tbl fulltable char ?a cnt 0) + (setq tbl (seq-filter 'cdr fulltable) char ?a cnt 0) (while (setq e (pop tbl)) (cond ((eq (car e) :startgroup) =2D-=20 2.39.2 (Apple Git-143) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable =2D-=20 [ stardiviner ] I try to make every word tell the meaning that I want to express without mi= sunderstanding. Blog: https://stardiviner.github.io/ IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAmRfndQACgkQG13xyVro msO+jwgApuUnvCFzQb7hfGF6ye/5C2KOqhqUpy8M5srRsgH+lNcDbA/I6voNCfwh OWfP2AlV3y2Fr+9bq56RJvii+9R/sFhy3psLn5+dPqR1fY+vzpUok8k0IkF4/wyG oyuaTQiM9a8/+cHOMRyFKMwtR1114US5YKLPSy6B1zX4agoWF5H8Ojfl2gzUhP2w t6DbY7ob2ITs2hVtdDGluVxwJ90uw79hxJPjYDMFRF7gjfP+Pj2DOVxu/JeWPrAD B40r6rH9Ayiia8tMXAu9gxNtLeFVqNrjimSIHlfrzztNuOj6AnFl7rQyo0+uBrJm nMktBuIsNw+uaTqiwtMwHwxx79/VVA== =sg82 -----END PGP SIGNATURE----- --==-=-=--