From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id OJkHDsT7vGEUzgAAgWs5BA (envelope-from ) for ; Fri, 17 Dec 2021 22:06:12 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id gEnXCcT7vGGDXAAA1q6Kng (envelope-from ) for ; Fri, 17 Dec 2021 21:06:12 +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 002D02B72C for ; Fri, 17 Dec 2021 22:06:12 +0100 (CET) Received: from localhost ([::1]:45968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1myKQc-0002JH-Eh for larch@yhetil.org; Fri, 17 Dec 2021 16:06:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52022) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myKPt-0002IZ-NA for emacs-orgmode@gnu.org; Fri, 17 Dec 2021 16:05:25 -0500 Received: from ciao.gmane.io ([116.202.254.214]:56328) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myKPr-00046U-NT for emacs-orgmode@gnu.org; Fri, 17 Dec 2021 16:05:25 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1myKPp-0002ni-DK for emacs-orgmode@gnu.org; Fri, 17 Dec 2021 22:05:21 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Lele Gaifax Subject: Re: org-persist Date: Fri, 17 Dec 2021 22:05:07 +0100 Organization: Nautilus Entertainments Message-ID: <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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cancel-Lock: sha1:+TqbU7a8KyMYIAdwRvtoDbayGWY= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, 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: , 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=1639775172; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=+ECT9LvCWMv2g3vkf4q9U/L+cmacvN2omuUiCENjzJE=; b=jq1C2GJ8fd/teYRGci0ueXR5EfDHT13ir9Igl3yEiSCflockvCj2rt/spUXs3Z3Pa8LEkp Kv9D7zKxvIjCcQfd7RJgVAGxvX5A+imHhlPoNcyue3K6yzkQnCRgFZEiIiaP8fdCH974He oTCjqoZwRBuyMAqqcNx/lIfwPXHy/qQiwx/xNDQha3rxyFR4EwhW5TrQrTiUjfB4ZEdkf+ S3qv4PD8Jp8iT8EoiwpI7GV+RyL9icsD5aLxvSiOiJOWIK7RtxyVPbhR3egDMTRvfEnt1Y 6182HTa+L4pHK1/SUtkVakSME5jwDktkbfpal7uV/7buETyoS7BtkKj8giuzkA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1639775172; a=rsa-sha256; cv=none; b=FAx0e7ttDpQLcmdoX8r60kUTJlLvppHDwNJuqCfHCgbbvBTNrh/Bu2O092Zj7JXpEeYQrN swnNjxVWbqneoYorh7fPhq2LBXIAgA1KYZHDFGF+G2K8FiMtEZdfIEyzl4Lvq6T5u8ONTN ELR7ZlNuhovo8+cKF6JAcl8no4qEs6dKYp2w/QrBOXaJThyQRPpOIeUgcLUfq0VXpzMWGT OcnRUjMMwX3pNGVMPguMqiU0LyoLAmfFZWetL3IC9SQksZIhropNHldAvX8ymZQdjvjT9w iYAiugL/oQ5Kj+2zuU8hvTqzAus0qDS+sZ7A9uK0oGdMm5uYUkGtjJr3ELCnrg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=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: -3.00 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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: 002D02B72C X-Spam-Score: -3.00 X-Migadu-Scanner: scn0.migadu.com X-TUID: /UR7XDNoI6d2 Hi, Ihor Radchenko writes: >> I had originally set org-element-use-cache to nil because I remember >> reading somewhere that the nil setting would help prevent emacs from >> hanging in org-mode. > > The cache code has been refactored. I tried my best to fix all the bugs > causing the hangs and I am not seeing hangs anymore. That's why I took a > risk to enable cache by default on main. today I spent the required time to investigate on one issue I had with my Doom-based profile, that uses the "master" version of Orgmode, and found it related to the org-persist functionality. Basically since some time ago, quitting Emacs I was sometime prompted for a password, some other time it took a considerable time to close the instance. 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. 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. Thanks for any hint, bye, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. lele@metapensiero.it | -- Fortunato Depero, 1929.