From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id kCy+Ft5hPGDnNAAA0tVLHw (envelope-from ) for ; Mon, 01 Mar 2021 03:39:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 2PqIEt5hPGDAcQAAbx9fmQ (envelope-from ) for ; Mon, 01 Mar 2021 03:39:10 +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 B50A520B4A for ; Mon, 1 Mar 2021 04:39:09 +0100 (CET) Received: from localhost ([::1]:52004 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lGZOl-0000R9-KT for larch@yhetil.org; Sun, 28 Feb 2021 22:39:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50798) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lGZON-0000Qx-CH for emacs-orgmode@gnu.org; Sun, 28 Feb 2021 22:38:43 -0500 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]:38601) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lGZOL-0001nY-Ga for emacs-orgmode@gnu.org; Sun, 28 Feb 2021 22:38:43 -0500 Received: by mail-pj1-x102b.google.com with SMTP id l18so10795777pji.3 for ; Sun, 28 Feb 2021 19:38:41 -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=rbV/v9M16bbIk9MEyztV1TNZii4Od9zLfdZLwR20hUA=; b=RYWSksNGDoINwZRAe6rusOM4GjDOrm164KCCnUzLmw2OlGqelGS0qbalzJr7m/Lsov i4Po28dH2NnfTBqiCgAAo8AxfzdZgP1zL0IHCkUVyMnzGG+45R33kfVyUAEY4idteZJA OY4lWh3NoFju1br99z5LcAa0saiN0DZucUZcw2MCdaNd1byIECSZ1UMLOGo7qmYe7VNx 0zzN6gstWrhPhhz/Bzss51B2q9UlGgFqumKmOFXm3r+p9vtZ1WOuVv+ISUS1V4COJ8Zr Swv3hiJVU7O13c7H3O1ZTa98X7oB2VOMFadUU+7cqEm0ZdTQjdqEHvcWngk7p/AGnh0Z sPCA== 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=rbV/v9M16bbIk9MEyztV1TNZii4Od9zLfdZLwR20hUA=; b=IUxHLMNuGh1frNFRehETksQvQP/veu2sfkc3RvrtRH1m98gzIyISLDIjubUH8dmLsx So0ExrB0rrxaXakblkDJw4z2ojcFpjfYSu6DsTltzwZDFW91hAzTv+WomSHsTmJan2Mu 29hYuotTVlACFIBsS9XSL83+h54t9lJFNLohRYCLJZXvqe/Fr1sWQbl5EBuYt/BIon1U Oo8c3S7jvGJkyJrn7mnDTM7+9t/ZQEbTHp90ofn2q7YxRZl8R14YIxLEq4sq/pv+lOSv itYUTNGvVThxZkqtCzbvX9ZlIv3d3KxMhgdU0zL/kx4mLmCO1pwTMcNtKSKUNkI591lM AxhQ== X-Gm-Message-State: AOAM532+cf3oQIcuErS//dwMoJOXNZJuIN8x8yA5x8Hf+FfdeOO+/gKa 6WqGruxdtTjwFO6Av7m5nrU= X-Google-Smtp-Source: ABdhPJwSgN/AT/WpvQUGH8DxMO+T//kfknBWhj7YA2pr8WgU8UmTRfDcZjG4dKCD7LSnRA12WGQhOQ== X-Received: by 2002:a17:90a:9501:: with SMTP id t1mr15692925pjo.72.1614569919981; Sun, 28 Feb 2021 19:38:39 -0800 (PST) Received: from localhost ([104.250.131.79]) by smtp.gmail.com with ESMTPSA id s62sm16319949pfb.148.2021.02.28.19.38.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Feb 2021 19:38:39 -0800 (PST) From: Ihor Radchenko To: Samuel Wales Subject: Re: Tips on maintaining history in Org Mode In-Reply-To: References: <877dmuc8qs.fsf@localhost> Date: Mon, 01 Mar 2021 11:42:38 +0800 Message-ID: <87pn0j8rpt.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=yantar92@gmail.com; helo=mail-pj1-x102b.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=1614569950; 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=rbV/v9M16bbIk9MEyztV1TNZii4Od9zLfdZLwR20hUA=; b=c+t+rnuA3DMdngs0woDhxTDOIiW6/QrSj0hWNj4lYFm7j4aOHgQuQLwMW8Tlr9dwN7kUCZ 5Hum8iDKVCHYXFEd4zzPiBt2rkLupwqrxrb9wvRe+0I/wErvQiGyyI0lkAu4+t+FeXMv3z Pc5xoMTWdm3/zPm6CEAeJYpOO415FxRtZ5dO8ZsXuU4gPbjR71+/BrMHTUYip9Qv6dSPlF CFpDV7NQ3m0dsq/KrrvbnGWnj4OZVFowVGduLvU6iyAKwNKR5dDwwz+BfxsUj7PBPf9mqB BwYAM9kTjQ/Vk+yEYS/07v9wporTO8cu34uRLD/9TQ5HErqGV4YGlz/JByOmnw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1614569950; a=rsa-sha256; cv=none; b=hlxh2L7FE42TF0fwB1iYO4nWmueLxtL7ZuaA+O2o8oz1u7sNeRXydySJftindPIK+GtLhF nrFpv6X2XiAXb6loByPA/u+LazPZlJuxx2JcPSBY/v3e5Ga+pcTeKq6Deoj2zcWGQxGUwi YPWgl4COlOEfYnKb3gGVRzb+iubaz4m1RI3FPvSlCD5knn5BxZm0i0005TL4EMxwdjM2NU 2V0IqrIr7rd+osaNsmOK9CEebU4zk7dUgYW9I2bywygL3e1EwkjLmVU8X8zzXJ0aoMOZr1 uN/8f21DpSHSNEY9Ap4Sx/V7SonhUIMxdsll5JSh6eAV6qvsOWQA5IzWDtI20w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=RYWSksNG; 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=RYWSksNG; 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: B50A520B4A X-Spam-Score: -0.77 X-Migadu-Scanner: scn0.migadu.com X-TUID: zSEk8DGWJEWh Samuel Wales writes: > Hi Ihor, > > it never occurred to me that bulk archiving could be sped up by > changing anything about the archive files. i assumed that archiving > worked by appending to those files, so once the initial find-file was > performed, there should be no additional slowness. Disregarding the initial find-file (which may also be very slow on large archives), the slowness is happening because many org-mode commands are using line-motion functions that respect visibility. Those commands become slow when there are many folded elements (see [1] for technical details why). So, many org commands tend to lag on large archives. The lags can be solved in several ways: 1. Reduce the archive file size 2. Use optimised folding mechanism [1] (this will speed up org-mode in general as well) 3. (untested) Put #+STARTUP: showeverything at the beginning of the archives, so that nothing is going to be folded > i will keep in mind disabling font lock in archive files. any > suggested code for that? Note that it will mostly affect find-file performance. To disable font-lock, you will need to customise font-lock-global-modes, so that it does not auto-start in org-mode. The value should be something like '(not org-mode), but check the current value - you may have other customisation in place. Then, you will need to have a custom org-mode-hook that activates font-lock only when the org file is not the archive file. Something like (defun yant/font-lock-activate-maybe () "Activate font-lock in non-archive org buffers." (when (org-all-archive-files) (font-lock-mode +1))) (add-hook 'org-mode-hook #'yant/font-lock-activate-maybe) > your config is impressively [and for me > dauntingly] comprehensive. the Archiving anchor does not seem to have > a referent. I searched for archiving, but didn't seem to find what > you were probably pointing me to. Sorry, the config is actually not yet formatted for public use. You can search for the code block containing "defun org-archive--compute-location". You will need that code block and the following code block. [1] https://github.com/yantar92/org Best, Ihor