From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2OKqDc/6LWINYwAAgWs5BA (envelope-from ) for ; Sun, 13 Mar 2022 15:08:15 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id +LYYBs/6LWKaLwAAG6o9tA (envelope-from ) for ; Sun, 13 Mar 2022 15:08:15 +0100 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 C70693FF65 for ; Sun, 13 Mar 2022 15:08:14 +0100 (CET) Received: from localhost ([::1]:41204 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nTOtI-0002aP-Lj for larch@yhetil.org; Sun, 13 Mar 2022 10:08:12 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58964) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nTOsu-0002a1-DV for emacs-orgmode@gnu.org; Sun, 13 Mar 2022 10:07:48 -0400 Received: from [2607:f8b0:4864:20::631] (port=34485 helo=mail-pl1-x631.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nTOss-00022e-5x for emacs-orgmode@gnu.org; Sun, 13 Mar 2022 10:07:48 -0400 Received: by mail-pl1-x631.google.com with SMTP id r12so11498676pla.1 for ; Sun, 13 Mar 2022 07:07:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=HfCvn8cCXiM0/8iqgARTf8lzaEcVy/cqbyGl5nBCJuk=; b=CMWsuPcx4z6zKg6QbyM0+vO9hphzKwCkuoQ/crtiya8gm1YDMC5prbF58RuXe2EFqy /Ebfu7BUx9spT3qnntXNLREAb7AFvjgt2jh+ji6IiNAkeaYIlyVJ43957NZOdsOsWAq6 mlws6Tdi2t6YjDXfUlcv9VY3xREBnj5oRY6jco4U6Vu5D8h1yhvZxR+ss6cyJirmpt17 VzexfxpB4Ko2SEzsZaKY0JuTS/vneJMmwFg2dO1OvfB4+gIm8FVSlyXz3+g1KcinX1ix YfpN16eJE/cKcgb7bH5j5b5mdPMc9d9skvnnF49IqDFkVktdTR5IldTu3pdkVaA2ftHo rvjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=HfCvn8cCXiM0/8iqgARTf8lzaEcVy/cqbyGl5nBCJuk=; b=2GjNhDwLpHRx96LEr1RFrAxPKLmrlG3V+/qX1o3eaL2eKpDAX6MthNGaB5E03OamKP M7bqWN+gbqQbTTZdZM2ReoZzzZPkY9tHUEYueN12sYg09FJZtLVmLJ05+uCJGXcqC+Zb Vo/cpsyZ8irIIqc8NCZLSZhwVNcl1YK2yUMeh3lp3p7suWsttlZ/Bwtv5thg2OSodYgT /U48tptkSoal8MbauBsK6/233gW+XzJ2CovNupKorCFuGeLmHa/KhTj5if4OWQkxzR3t qI6E/0Laey1Q+wWKCtlOarjtXfTOYTH30EhnugyqA/cGZhLFCFX6dS0dNE4Tf5ec0NYE yZBw== X-Gm-Message-State: AOAM533C6fzghW3QLAfuj7u0C0d+G8gpmpGf7oRJW08fgw8VO/9CpwRM z0CGSJyeLyTeJSr+WrnI8Jg= X-Google-Smtp-Source: ABdhPJwxL5UVYcjQ0i73Mq5fdjPZU5AkTiXc3JbXSisMKcHXnmcLMXJmDYEPGeEQ1D77xnthlrg1ig== X-Received: by 2002:a17:90a:cf:b0:1bf:50c6:64e4 with SMTP id v15-20020a17090a00cf00b001bf50c664e4mr31384853pjd.81.1647180464392; Sun, 13 Mar 2022 07:07:44 -0700 (PDT) Received: from localhost ([192.161.177.252]) by smtp.gmail.com with ESMTPSA id j9-20020a056a00234900b004f6feec0d6csm16586719pfj.2.2022.03.13.07.07.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Mar 2022 07:07:43 -0700 (PDT) From: Ihor Radchenko To: Samuel Wales Subject: Re: [BUG] LOGBOOK makes property search (in org-agenda) too slow(?) In-Reply-To: References: <1647072773413.12830677.36af16aa16b2d452bbb76138604ed7e16bdc4ed6@spica.telekom.de> <87sfrne4ff.fsf@localhost> Date: Sun, 13 Mar 2022 22:07:10 +0800 Message-ID: <87v8wic5f5.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::631 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=yantar92@gmail.com; helo=mail-pl1-x631.google.com X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: "emacs-orgmode@gnu.org" , fr_ml@t-online.de Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1647180494; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=HfCvn8cCXiM0/8iqgARTf8lzaEcVy/cqbyGl5nBCJuk=; b=SJlTQ3MXkuTMAoWpfkweGGK44RShr10Hkez8CGP2bXP8c/rWzsnv8+0YUr9X1vqrfAaPtK /1j7yQ+U1u2XR4wDbUoZ95+eeBe2Uxx1BdDzear1FwtK2eHu9iYT9/v6dIzdK6Itn+Wej1 LscQiZoWaAdtiRF48qm3Wpyih2avIViU1zFA01fug1sUJzhl1jGtAHQwnlDz2uH/fZKnk2 c8rFs0bwlVwxpXcLsKIcXvF/es1h+BGPvv0ljV2Qybq1vCic4VDdF746pb+y9qX8mjdzKH 0XypEyfRsRNbH/HyHzHrrNU2hoKhkox8qxJ3GZ+sXEtWDIB/bs5hi+mn0ZdjOw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1647180494; a=rsa-sha256; cv=none; b=pQt3QQJ3mo7IolvZVKIEYpTC7AOqxHc3knUi+cGxlZToI/w9D1KI3ZRoxmOeka0zJdaSlM gPBtAD79kWJ2PpBek2uz1q60ozhQdi1KJlvQP3SHZrYUMq28jJqGf7VhX+aq4vs4DkpJ45 P6Y6oA95bp0g6Z9pnsjllizm5NnlWB+wskUXRo6U+Z3VL2XkGwLnTcWdjaL2u3GrvtXzeg 5T683G8bP+gAN4Q1zAPBzkvD+rjwID+6uzcNYoxXiU2TyzC+TLNzQOUuGNS6ceQShnqwz1 37sD8r6MkRh+1Fh3EsfWHyRQVg+DzumSyTsbidUabas5st+dsAY1BPptW5P9sA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=CMWsuPcx; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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-Migadu-Spam-Score: 5.93 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=CMWsuPcx; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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-Migadu-Queue-Id: C70693FF65 X-Spam-Score: 5.93 X-Migadu-Scanner: scn0.migadu.com X-TUID: FWq5GWHKd3qo Samuel Wales writes: > are there intereim workarounds like semi-automatically moving large > logbook entries, or entire logbooks, to a task that says "was logbook > for ..." and then archiving that task? or automatically archiving old > logbook entries? My largest logbook contains ~2.5k clock records with no obvious impact on performance (on main). However, when I was using older Org versions, I used the following helper functions: Credit: https://www.reddit.com/r/orgmode/comments/dg43hs/can_i_archive_a_property_drawer/f3frk2n/ Caveat: you might get duplicate IDs using the functions below. I just changed the archived ID manually in the past. #+begin_src emacs-lisp (defun my/org-archive-delete-logbook () (save-excursion (org-end-of-meta-data) (let ((elm (org-element-at-point))) (when (and (equal (org-element-type elm) 'drawer) (equal (org-element-property :drawer-name elm) "LOGBOOK")) (delete-region (org-element-property :begin elm) (org-element-property :end elm)))))) (defun my/org-archive-without-delete () (cl-letf (((symbol-function 'org-cut-subtree) (lambda () nil))) (org-archive-subtree))) (defun my/org-archive-logbook () (interactive) (my/org-archive-without-delete) (my/org-archive-delete-logbook)) #+end_src Best, Ihor