From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id EFluDztOjmAdYAAAgWs5BA (envelope-from ) for ; Sun, 02 May 2021 09:01:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id YBsfCztOjmBPRgAAB5/wlQ (envelope-from ) for ; Sun, 02 May 2021 07:01:15 +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 6B67229435 for ; Sun, 2 May 2021 09:01:14 +0200 (CEST) Received: from localhost ([::1]:55284 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ld66L-0006FN-Hy for larch@yhetil.org; Sun, 02 May 2021 03:01:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50988) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ld64I-0005Oj-MQ for emacs-orgmode@gnu.org; Sun, 02 May 2021 02:59:06 -0400 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]:44027) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ld64G-0004ds-6C for emacs-orgmode@gnu.org; Sun, 02 May 2021 02:59:06 -0400 Received: by mail-lf1-x12e.google.com with SMTP id x2so3413338lff.10 for ; Sat, 01 May 2021 23:59:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:cc:date:message-id :mime-version; bh=AaKqsWlhQpJBxh2be1ncp5PQH4zQ3neGc0zYKH0DlYU=; b=Ow/Fl601z4sh10Fl743ZM43U2YnGrGZ2MczxYTBdooMHFrxOCwqYh8xfJ4iOxh5w+2 T4GhrCG97UgSg0iJDob3VhNGYp0mbyFlRrid02KJ3OTnjZsNMqLBZN7peUJAdudWDFnD M3J45WwdQ3ajrJFANjldmarZVmIee6KbVlGrw4+r9VkhHJ1YM0YnKG1Vk5VY5Q/TzksT 0G+Tg7qtBr5f7ItDxabcsvPA6WIrvtVbkvVpnEvIfeGFulp2fV6AaTiKslVzGQ4tV0Q4 +fX7ecFxnpbrrUJoEXLKZNiUh7xF07dvs38tBcpwbaedO+JUBw1buYiArQ4rEsUBz7Nv NNgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:cc:date :message-id:mime-version; bh=AaKqsWlhQpJBxh2be1ncp5PQH4zQ3neGc0zYKH0DlYU=; b=O9gKgEDTTsZbWk1MCDAUNkrkSaqKLE8iN4dc0NPqxpS+omkParlcLVmOq0+Kwh7kjV MS2JTSzwfyDESnJHmkf+dQrMs8QlbxZqX+ulf8i1GaKu3W58J95JfJ+ZAH0MN+R49uwl n+e+xNdrqhFvynBRVNaojr2Wx/AvNWzIh2jfptSxTZuY5Ijr6J4FwpSeHRH6GVRdIaTW 1a8pX31QqjOCQ3bgkO3jlzm1FpkVzyE5VJDkpG0C+HkgogshsvpbsuMibabGNbdpOfCU oIngo6+NZ9l8zR5x5L98Q00jrDo51glGT8K6vxiaTYWYG1XQiVXm5a3s5oEKPUCqB6sE tlwQ== X-Gm-Message-State: AOAM532hb0x18SC3uyLDGfzfXXvFa53zTHKb7PdUZSYR9ooAJmV4hxlX NjuNJzp81zaV10F9jcepKvs= X-Google-Smtp-Source: ABdhPJy/xqHI9hdCBdQHaOdXKuT3rH9QbQftHp3JEOcNQk5gW+Ly0NSmoLSMI7dA1WvG2V9WkgK5Kw== X-Received: by 2002:ac2:5316:: with SMTP id c22mr8845696lfh.609.1619938742488; Sat, 01 May 2021 23:59:02 -0700 (PDT) Received: from localhost ([91.210.107.197]) by smtp.gmail.com with ESMTPSA id f11sm766485lfr.119.2021.05.01.23.59.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 May 2021 23:59:02 -0700 (PDT) From: Ihor Radchenko To: Tim Cross Subject: Re: [PATCH] Bug: fragile org refile cache In-Reply-To: <87sg38j371.fsf@gmail.com> References: <87v98598un.fsf@localhost> <87mtthxloy.fsf@localhost> <87sg38j371.fsf@gmail.com> Date: Sun, 02 May 2021 15:03:26 +0800 Message-ID: <8735v5d3cx.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::12e; envelope-from=yantar92@gmail.com; helo=mail-lf1-x12e.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 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=1619938874; 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=AaKqsWlhQpJBxh2be1ncp5PQH4zQ3neGc0zYKH0DlYU=; b=Ch3dNT2pUP6bKP630Nh9HZ/gogSAhrR5SN1Bzw1Klp5hQyJ8Ng2bV09P9hOe5DZcCrG1w8 qERWymhwhOIZlq/FjScLc+FJ4k5jmjUwDttNNQCyayXToC6agkl3dFuuA44HUxr8TC1EjH 9vQsdyglE44Z/0+eGTpUwQf8SEb/0BDVwJJMK1wUwZywn9opU4EZPw1cn9hH4ETLsen95P Dp5y3P++4acdSgyTZO5mX6QxrM6hV+dwEqV20QWigBzRume9y4vvJXQKA6OPXZBqYBGb43 9ZscBTSy46H5ebkmx7/W8LwLP4xstY0N7UoWcUDPPbw1pWW15IIvmxiqWsJPYw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619938874; a=rsa-sha256; cv=none; b=WDk/LIWHB7y+oiZzYA69TPr3IHqHlYWovL54M772t6n4ScVATSY/L4xdbZ8DBocLQ5VDUD FUiOnAvGL9pKfG1rxcF48LNZUY7BxFIURHpVGXYbY0H7k1NUVNMmHyzKpFunxWcbk6D/67 iWIqY78/kIWyQ9XjSfeub2FoTLwRK04DwG/pcRH4V+W9WOYfgiT7ANwL3H1Jfr5fezJjei ylg9SS0ECiycFoqvzGYvs2JHrIiEaXtLDDgWpPMlJn6Be6ZGkTm+g0VJXrn2XV1K0Kd05U G2kUl0/GWmel3JHr4Ub1QHeDHwGolE9vynLBSx6UZ1l8lO/tgfQ74QCCuY2I6w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b="Ow/Fl601"; dmarc=pass (policy=none) header.from=gmail.com; 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: -2.66 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b="Ow/Fl601"; dmarc=pass (policy=none) header.from=gmail.com; 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: 6B67229435 X-Spam-Score: -2.66 X-Migadu-Scanner: scn0.migadu.com X-TUID: 3O8snX78fboQ Tim Cross writes: > I suspect the reason it is not done automatically is that getting that > right for all use cases is very hard to do without adding adverse impact > to performance. A cache which is marked as 'dirty' too often results in > too frequent cache refresh operations, but at the same time, determining > what changes in an org file actually invalidate the cache can be a > process intensive operation. Allowing the user to force cache refresh > when needed is likely a reasonable compromise. Not really. `helm-org-ql' uses cache that is invalidated by _any_ change in buffer + updating cache only when results are queried. Performance is much better compared with built-in Org solutions. Also, there is `org-element-use-cache' doing more granular cache invalidation. You can enable it and test the performance. It is not really degraded (except some hard-to-catch bugs existing in the org-element-cache code). Best, Ihor