From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id kLEiFEekT2R31gAASxT56A (envelope-from ) for ; Mon, 01 May 2023 13:36:39 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id qCUPFEekT2RRfAEA9RJhRA (envelope-from ) for ; Mon, 01 May 2023 13:36:39 +0200 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 08DAD8CC8 for ; Mon, 1 May 2023 13:36:39 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ptRp2-0002uQ-RO; Mon, 01 May 2023 07:36:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ptRov-0002tn-Bx for emacs-orgmode@gnu.org; Mon, 01 May 2023 07:35:55 -0400 Received: from [2409:8a28:6038:2b80:52d2:f5ff:fe16:c591] (helo=Mac-mini.local) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ptRor-0000TJ-DE for emacs-orgmode@gnu.org; Mon, 01 May 2023 07:35:52 -0400 Received: by Mac-mini.local (Postfix, from userid 501) id 4CCE58A9E6E3; Mon, 1 May 2023 19:35:41 +0800 (CST) References: <87pm7lyvdd.fsf@localhost> <87jzxsqyme.fsf@localhost> User-agent: mu4e 1.10.3; emacs 30.0.50 From: "Christopher M. Miles" To: Ihor Radchenko Cc: numbchild@gmail.com, emacs-orgmode@gnu.org Subject: Re: [SUGGESTION] Re: [PATCH] org-crypt-decrypt-entry: Apply initial visibility upon decryption Date: Mon, 01 May 2023 19:32:21 +0800 In-reply-to: <87jzxsqyme.fsf@localhost> Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2409:8a28:6038:2b80:52d2:f5ff:fe16:c591 (deferred) Received-SPF: softfail client-ip=2409:8a28:6038:2b80:52d2:f5ff:fe16:c591; envelope-from=numbchild@gmail.com; helo=Mac-mini.local X-Spam_score_int: 25 X-Spam_score: 2.5 X-Spam_bar: ++ X-Spam_report: (2.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FROM=0.001, MSGID_MULTIPLE_AT=1, NML_ADSP_CUSTOM_MED=0.9, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665, SPOOFED_FREEMAIL_NO_RDNS=0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: , Reply-To: numbchild@gmail.com Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1682940999; a=rsa-sha256; cv=none; b=lshETplFGykrekt/o0r7ZTvep77TInDpd/W+QG2/n/HaDfi4plJ5VP5fQNeAcsyrQZ4HaZ /c6bQWos6mws4OEIVdt50JL52k/Ae2qepTIuM9WM2K2ls+1MyMmcVdMjkw9Kiv0IBSVeEt NBDKTk9VlJ4VCMwZYgr9Og2c2YhH2UuwNPXLJjHBz9sBfdga4WqZEO8W0MEn6tHJeWxmlF 5eqFtXFuIcbC5eDYkRN/IKEMmhTwjnJPQvEWVvaoWTjFcynlGmhc0q/EjDt+CrOeYE1y3q BHopPi7uMGpLfNYkbSLMK47oaK9eCy6mWLYAVIZitYWRjjapcyoUdfmDf+VDwQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1682940999; h=from:from:sender:sender:reply-to: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; bh=KwC+SZxG/WuJr2B/gydnprjW1WkHgd0R/ady2pIkxXY=; b=RJI3xhooJ05Bh+Yl29MKBRBEtyoPWm78RmrPUf//fj0uNMVedprazamSTe4YjYPniahVpJ +eyvFOcokhs2SiVTb6x1Q6QXDv9iZWOijVGEBdZwBIoqFj19TNnVCf202cSK7cVhkN4ynG NxPTbIeAF9AY20H/F7Qp2eivL1HIsBF4soenSVMhXL5Ljyd3i/ooHCO0jIUonixpVCrCl5 3YiaLiBPmAirHRR6Jha4RE7c7A+n6CNF8HKAjY80vua3aHF4vFvYdNXKG4bxtRqV+RHWyT duINVREGMsVcp1hRq8g52lJlWXDSYzgZcJBco7ux3JKq1XVanXx3IL2U4ncaDQ== X-Migadu-Spam-Score: -3.51 X-Spam-Score: -3.51 X-Migadu-Queue-Id: 08DAD8CC8 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=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-TUID: v26mFXGFETIz --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Ihor Radchenko writes: > "Christopher M. Miles" writes: > >> I'm also try to improve this file to improve large Org buffer saving per= formance. > > org-encrypt already caches the encrypted text and takes basically no > time for the repeated encryption, as long the text to be encrypted is unc= hanged. > >> I have some ideas: >> >> - auto encrypt buffer on buffer save hook (currently mechanism, your pat= ch improved it) > > Sorry, but my patch has nothing to do with save hook. It only changes dec= ryption. > >> - auto decrypt on org-cycle expand headline if current headline is encry= pted. e.g. on `org-cycle-hook` > > I am not sure how it has anything to do with performance. > You can already use C-c C-r (or M-x org-reveal) to decrypt entry at > point. > We should certainly not attempt decryption on by default - it may > be annoying when you actually do not want to decrypt anything, just > look inside. You're right, I have not consider enough. > >> - auto encrypt ONLY current fold action on headline scope if has crypt k= ey specified. e.g. on `org-cycle-hook` > > That might be possible, but I often do not want my encrypted > sub-headings being encrypted while I re-structure and re-fold my file. > > May you elaborate what performance issues you are experiencing? My performance issue is a large Org file about 2M size on saving. I will reproduce and generate profiler report for more detailed data and update in this thread. =2D-=20 [ stardiviner ] I try to make every word tell the meaning that I want to express without mi= sunderstanding. Blog: https://stardiviner.github.io/ IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAmRPpAwACgkQG13xyVro msOXAAf/SaSUvKYtiRjGIlP2h1eKgsWYzgwlX9Hz9Lx5ZgqlPjg+P6MPDheEOz8k BNi3i5VU9RwfedX+J8hClpFW9vzs4MNANa8sqr6dgcnyNwtKF0Vvmp8S23Pd1Rjl c5bJnkgmtExC2m/TaC1ecsMHW1eI7sxoYmzMZ2/tMKmIGSwz3w/g7CPwpfkQ9ouy Pd/+T5jx59mkflqcQKuz9fQe5gVZ40q4cMqgebTo4A0Edil+7gwqAbJKfvjHxo3r tzNPoGP9avxD5oRcTaDFo1RUN/UPXH7gKZkUYnm7c8472vH/fnlETWXfpAWpeyE1 ie/HW/VZ24RXRpDtC8lrIHBbJuNoIg== =pWRB -----END PGP SIGNATURE----- --=-=-=--