From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id eG98AO9hvWFkPQAAgWs5BA (envelope-from ) for ; Sat, 18 Dec 2021 05:22:07 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id AL60N+5hvWFMAwAA1q6Kng (envelope-from ) for ; Sat, 18 Dec 2021 04:22:06 +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 BB4F118E91 for ; Sat, 18 Dec 2021 05:22:06 +0100 (CET) Received: from localhost ([::1]:44346 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1myRET-0004Ar-KH for larch@yhetil.org; Fri, 17 Dec 2021 23:22:05 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60746) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myRDp-0004AU-1D for emacs-orgmode@gnu.org; Fri, 17 Dec 2021 23:21:25 -0500 Received: from [2a00:1450:4864:20::12e] (port=40530 helo=mail-lf1-x12e.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1myRDn-0004xU-EB for emacs-orgmode@gnu.org; Fri, 17 Dec 2021 23:21:24 -0500 Received: by mail-lf1-x12e.google.com with SMTP id l22so8660842lfg.7 for ; Fri, 17 Dec 2021 20:21:22 -0800 (PST) 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=J+BN2CmYNaUxBNU5kgwpE5+b/UBFjJe1iVeE9jcbBOU=; b=cLhgikgtEYkmej0j4qOF8UVZlaPsxfj+WgodL71GX4t8PagDMBj0jdZjMiaLk64rOy y84gj9YRF7KQe3por4I42PllbBFyoMrY6QzEfYACM31sbo/iOjIa5CkMUI133VauidFP BJgglEoNARrImh1MP4TKU6I+8wlK6l1a9BETv1ExjWzfk4PMQBkAmI237Fya6O4c6epw 5kwJb6LV3iU5rekqinG14hxBDJbuZiNRbyOGZfZmYIZPfZjTJgYXT1ohr0ZwbquzvnP4 TJXcfEv3HRkj9bwulE9ejslDqFSGSI0dLP3yyQe7Uf+ce0/Ac4nXgHq1EgXWPY2leD1x ApSw== 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=J+BN2CmYNaUxBNU5kgwpE5+b/UBFjJe1iVeE9jcbBOU=; b=7UQznvNjEv1dFMgarWHCghT1ZKS26aOJiRYvZn3XaqAbtkA3EDXWQKDewisnVYQSia OlctUyI4vx0Bt2xA7Umvl3XQbvYxYxkGHwGDDwX+Jkum/O5VyQd3MLmWCMjJ/qOUjSFY oFuT/zhA7/7uV8LTcP0r+rKvQvJVAmS6sO7Obg3W8KWAfuoT/0PiT6Lyhu2WhYCnVPNW Jp6RgCrlXKw2QINPMHEmqhbJH7mHxWxe87Bjz4/mVV3IXxvJ7UG//mD+pHpDyxT2SzYR zE7vG4lz0W90S/IoBWVpVz9XZe3NUFPx1z1s2QnZOaSjKUp1SkGNVfSC+5hXcuxcQUXd ZarA== X-Gm-Message-State: AOAM532F8MNwk2pyEyyeTo5s5v+kGx1UMq+hCwONlcMCBkoSEnGjJud0 uhnvnkXwynhufj8NmMiisCSel1XlS5MdxQ== X-Google-Smtp-Source: ABdhPJzDoluyFuKs2DL6AcQeMPKVo4/de1iFPAxMkb4C9hB+NeF1+74xsc8GGj4UQANdwAE7sPG0Kw== X-Received: by 2002:a19:7512:: with SMTP id y18mr5963230lfe.236.1639801280598; Fri, 17 Dec 2021 20:21:20 -0800 (PST) Received: from localhost ([158.255.2.9]) by smtp.gmail.com with ESMTPSA id f3sm284123lfu.177.2021.12.17.20.21.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Dec 2021 20:21:20 -0800 (PST) From: Ihor Radchenko To: Lele Gaifax Subject: org-persist cache for remote files (was: org-persist) In-Reply-To: <87wnk3c58c.fsf@metapensiero.it> References: <87o87kb64s.fsf@yandex.com> <87tuhcfc3n.fsf@localhost> <87czo0nqw4.fsf@yandex.com> <87o87kchi2.fsf@localhost> <8735owawla.fsf@yandex.com> <87lf2oc9sv.fsf@localhost> <87ee8fncmw.fsf@yandex.com> <87fssvdfxj.fsf@localhost> <87wnk3c58c.fsf@metapensiero.it> Date: Sat, 18 Dec 2021 12:22:45 +0800 Message-ID: <87bl1eilt6.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::12e (failed) 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: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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 Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1639801326; 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=J+BN2CmYNaUxBNU5kgwpE5+b/UBFjJe1iVeE9jcbBOU=; b=W3XF+L8lSXOWCKGt7PjdLZwnLKeOkib2NyzudTdjyAymWKwutwqqaS5gafbyr7NRGPePr0 5e+bw2HiXvpsEHjvVxbXmJBWalxpUCk7aclC8zmzI2xSCEqFugsPoGMqgeXLMQEr/DsNNv ce8Pz8JT9OjECdq+BCMIefwbOkraY3QG8+pzIVGD+UMK9PSZ5lT3lIhwEBP0zlTqDCA+xY QsxPYkO9pwTNJXZaYzOHj3oo3+itrmEyhIiQQhdDiro1b6P4NuS60/PuWSSHwDcEwIOe17 wsEN0S1oDDms2cBOjAnDgiuhSlMefXsytSx4BfIdu542OKopInSXoDSFM/gaVQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1639801326; a=rsa-sha256; cv=none; b=qddYM3NkqXzuFiSJKAeHvs5qz7GAIkmN6Zaj4rrLFfdpAKP6tIWkKjABKov0yXJEu+ea+t MW2XahrODbTUVTVRDYTGR5weQm+zYtmxg5dFLEiTHIOdtzO5jO6ch89sNh54TibtOYIYZ6 udv5jLRmGQBKiJkkpwktrFamu897ThYYh5uBF02J13HbL7gwFZ5UMvIRQRBPxw/SLyxg2A 0XOeuxv651RfGUiFbPYIMCpKRqQmk3H6WNXhhEG2Y1zUJIHynqo/nP8Ho3XkniYAzUYe0E L5RRHzJ4O+q8pMgSWZPCNp0czk2bc4BaW5jIjyzDIunmxCWv+2qjXmZvxFo0Jw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=cLhgikgt; 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-Migadu-Spam-Score: -6.00 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=cLhgikgt; 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-Migadu-Queue-Id: BB4F118E91 X-Spam-Score: -6.00 X-Migadu-Scanner: scn0.migadu.com X-TUID: yNpLA0P80W7a Lele Gaifax writes: > Digging down, I found that it was due to the persistent cache, that contained > several entries about remote (Tramp) documents: upon closing Emacs, the > org-persist-gc function is triggered, and the index is traversed to remove > dangling entries, performing a file-exist-p on each filename. For remote > files, that obviously mean prompting for the remote password (when the > ssh-agent does not carry it) or spending a considerable time in the network > round trip. Thanks for reporting! I am not using tramp regularly and I did not think about this use case. > I wonder if there is some mechanism I could use to either prevent caching of > non-local documents or to avoid the check on existence in the org-persist-gc. I can easily make a change that always garbage-collect non-local documents without trying to connect to remote server. This can be one solution of your problem. However, I am not sure if it is the best solution. May I know more about your use cases? Do you frequently open large remote Org files? If you do, trashing their cache may not be optimal. Maybe we should better make this a user option? Or we can go a different route and just not garbage collect remote files until cache gets too large. WDYT? Best, Ihor