From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id ODXhJNiCPGBAIgAA0tVLHw (envelope-from ) for ; Mon, 01 Mar 2021 05:59:52 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 4HXAINiCPGCPdQAA1q6Kng (envelope-from ) for ; Mon, 01 Mar 2021 05:59:52 +0000 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 0C24C1AB46 for ; Mon, 1 Mar 2021 06:59:52 +0100 (CET) Received: from localhost ([::1]:57266 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lGbaw-0001NX-64 for larch@yhetil.org; Mon, 01 Mar 2021 00:59:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45432) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lGbZq-0000z2-MT for emacs-orgmode@gnu.org; Mon, 01 Mar 2021 00:58:42 -0500 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]:33681) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lGbZo-0003XI-Mt for emacs-orgmode@gnu.org; Mon, 01 Mar 2021 00:58:42 -0500 Received: by mail-pg1-x535.google.com with SMTP id g4so10831969pgj.0 for ; Sun, 28 Feb 2021 21:58:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=4FTuMZDriQleI8OXkqgVv72sKQHjO4mXcQHMYOA88x4=; b=btxbgnBH6kgb1EppkOcxdeoubCslg8eQ/2enxLJ0BVIrlGwVM9OMQtDibF8kb0Af0D SggbRB81HNgLj41aPPkwCaODnEXk0jNPsrIHXN1J8HP1VGdY+LkLDt3VsOM5wcdmH6xt weaVgT/anegFdlkt2jLAdhGiNKOR3pIOtMz0hqmEH4aMoi7ZJXnO88NtI/J0LzxdBCin uTmOyBLePYjyGFPwgXbHCGsB0FHvLry4WiahZz700v9JVl1yPiOtRYPpb+OF8xWeGEdW USVD1Q2DBZ8i0YDfkbmGjIagNcRlDHbY7PQxR3q7JB9vhnG+Mlr1r5C61dMpqV5hz2Y6 2gWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=4FTuMZDriQleI8OXkqgVv72sKQHjO4mXcQHMYOA88x4=; b=IGlGe5gEnsVR1IBMJRnEPAiwO1zDl/FxK/BD/qepwpUZMl/nPMeVBlz3FRXwvK5anS c0MS2Kb890FMHWHoIMR0RZCDgo92YVgDsw1RkA7uaLZpC45JksBAlWZh7EVxXLnsrCQj SHR8H8WlzNrD+UgaNoWrRTm21wJszo+XM+iREWskIGeSAsPGOnRF10/tub/Mvyz9lzpZ TAQYwMCISi6XUirw196lpwhVUnYt3dpDBTLwglWg+u4vsC85hRbqKimaqhZTAavBLFf/ QGM/EBKue0ILg+a51y83Z0Ss9V4oiB/ITpY8tOnbXOONL6b/M5qp/weCXrdsbPeyk8vv 8wqA== X-Gm-Message-State: AOAM533U4m2Agf07V7Qeek66dyeU41X0TBROEsAs7quNOYWHuSYgZK3K hB8euVpG5yVLWuQA6zY860o= X-Google-Smtp-Source: ABdhPJx4FiLgU8bsJ/UA4u65gShQkO1xCSJAmXbIMfrSj0vt7UwPKRnzU/eyuviaY40L+nHKCff4yA== X-Received: by 2002:a05:6a00:2c5:b029:1ee:6ebb:a9a6 with SMTP id b5-20020a056a0002c5b02901ee6ebba9a6mr6434578pft.74.1614578318546; Sun, 28 Feb 2021 21:58:38 -0800 (PST) Received: from localhost ([104.250.131.79]) by smtp.gmail.com with ESMTPSA id g8sm15198973pfv.140.2021.02.28.21.58.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Feb 2021 21:58:38 -0800 (PST) From: Ihor Radchenko To: Samuel Wales Subject: Re: archiving speed [was Re: Tips on maintaining history in Org Mode] In-Reply-To: References: Date: Mon, 01 Mar 2021 14:02:29 +0800 Message-ID: <87mtvn8l8q.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::535; envelope-from=yantar92@gmail.com; helo=mail-pg1-x535.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org, David Masterson Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1614578392; 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=4FTuMZDriQleI8OXkqgVv72sKQHjO4mXcQHMYOA88x4=; b=Dm+SUVnqOcgTkAeqCtVPnDB+5IaoSYrfmisWTeG/M3DW8tOpunqhHF6UiIuzyCeJuftTdK m1ikAqLIS+XFYuvSlzIVwL/c6Rcss96/+CEPJ2f6J7tJh5EHIQys5sJKnx/1MrhoT4Qmd9 USFpyMG3ruFKccQpqGdL3uYqwRiIdR9UDmqpoz7skqaMagdhFkPD2Ty51AB3ZL7gzDUIYW OctoEZ61KlQ/g+m/fYItEwIj5x8kr0rw3LyI7mBiCnJz4Ii1exz5vbHqJTs455tMd9LGUw g7+QFL5dupqrJn4B1k4mR0ltV1F/J+oQ/K5bt9jsZdiOBaPOcBV2MH/pdZnKfw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1614578392; a=rsa-sha256; cv=none; b=aOVmfE1reKWlxaSrgAXB5nWuZsIXqbem692CkIPSUB7HIkq8fCD6peiKTa5zW0Qxz8euro 0ls7RJo2iT+et76sqqEo/HZb4EcLMWsanF/M/iSy1IyfitTV5XPUA/scWoAUWARNquODRA ckR+vkQDPP/9Lh9qXfhEyDVQVOTDV+c4QAwryhtL2U6LKXvaR80B0WJcNprH6EIC4eqg92 CR7ipGrBrrquzMVXve6hCDP//VpzhdxBKetCuMIEfW26/0IpeUSRVOmULimr3bsAWrCEPv UIkM6MbpV8eVuwQKGRwwHAxFCGycV9QEqbKjfpIQq862iu51nRQVYYYMpftiiQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=btxbgnBH; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -0.77 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=btxbgnBH; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 0C24C1AB46 X-Spam-Score: -0.77 X-Migadu-Scanner: scn1.migadu.com X-TUID: e9NiMo828XOZ Samuel Wales writes: > that makes sense. but why would appending to an archive as the result > of bulk archiving lag? if the problem is large archive files, which > i'd bet is the case for a lot of users and not just me, then could org > in principle be changed so that all it does is append? thus not lag? > like, build the entry in a temporary buffer? Looking into the source code, the culprit appears to be the call to org-show-all inside org-archive-subtree. The call to org-show-all on master calls org-cycle-hide-drawers, which goes through every single drawer (= every archived heading in archive file) and folds it manually (just to unfold it later). Do not ask. > as i see it, having more than one archive file per org file is good > for speed, but doesn't work in existing org, because iirc e.g. v A in > the agenda goes org agenda file -> corresponding archive file and will > miss the archive files that do not have a corresponding org file with > exactly the same basename sans extension. The code from my config takes care about this. v A will work. I plan to suggest it for master in future, but I am focused on the org-fold branch for now. If you wish, feel free to propose a patch based on this code. >> 3. (untested) Put #+STARTUP: showeverything at the beginning of the >> archives, so that nothing is going to be folded > > good idea. my included-by-agenda archive files do seem to be in > showeveryting mode already for some reason. but perhaps not when bulk > archiving. > > would it be a silly idea for an fr that org make this an option for > bulk archiving? hmm or for archive files in general? Upon reviewing the source of org-archive-subtree, this should not be needed. Actually, org-mode already disables startup visibility and various hooks when opening archives. As you can see, it is not sufficient, since org-archive shoots its own leg later by changing visibility every time you archive a subtree. >> Sorry, the config is actually not yet formatted for public use. You can >> search for the code block containing "defun org-archive--compute-location". > > firefox find does not seem to find it. This is odd. All I can suggest then is cloning the repo and searching using Emacs. Emacs is more reliable when opening org files ;) git clone https://github.com/yantar92/emacs-config emacs emacs-config/config.org Best, Ihor