From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id cGz6D5p7hmZmEgEAqHPOHw:P1 (envelope-from ) for ; Thu, 04 Jul 2024 10:38:18 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id cGz6D5p7hmZmEgEAqHPOHw (envelope-from ) for ; Thu, 04 Jul 2024 12:38:18 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="QIdvi/lX"; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1720089498; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=AheajeWODKPx5YqMBqKLGiLEc6eghq5jj7LDYdjw4is=; b=epqyjTB+PlGmxDwTb0u+xRzg4GdfnQdfJbYnppLrv4wwDdzlvM1APipiLMVE7C9k2AKm0Y MZbiS4aR1goHcTPZPBUlFmQ/Zr9vHa0vIb748/ntmhlhu7Qs+b+E74grR3mEB6QPdNVpsd I3i9cqSCE67koWfvKuBL6rHjeBXipPp0jINRnQbDwckIO/14gNBLifDpywaVzTiAurCvNw FQlJG5MPG2zKAZuYj6CAV+sGuk6LTFjQ55QQ6XCE2jyD7Hm3Pq23DgttXJqxUi60EGz31C tv4EO40RqE0g+yqfPZfxWZAhNZ6lLj0T0AbnGZvcs6TM8ZqjaAvAXonPibMahg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1720089498; a=rsa-sha256; cv=none; b=u1lwhLVV9j3G/2CumO7AgCBg7/3ogVqNZKAzxrVYHOx50409334iqML+nwZ+9bAmElgthi 0OX3QItF/eQl+fjGDE81OsrTbV3eevJ4Trw/oLRkjdad5W0elLpmggAsCm1qHcGShT1gap pBwlNHsLixpzIBiMgVtgtBElwL8Kzx5QMNMexCxzRh7wxy3A8nh9iCddNNHsb0bjUb77j6 ByaW+MZ5s7EPK2+JqWD4MqyArDfcefOUk72cIhyex48zL6azeTHWw8rYUPhRv5QPWLh3Kc xUGmGcpY/mAJIDHQW80qkb9k7l2eV/qQj6Y507yesObivzbYyj42s0/de7cXnA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="QIdvi/lX"; 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" 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 EA80B32913 for ; Thu, 4 Jul 2024 12:38:17 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sPJpy-0006Na-Gq; Thu, 04 Jul 2024 06:37:14 -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 1sPJpx-0006NL-CJ for emacs-orgmode@gnu.org; Thu, 04 Jul 2024 06:37:13 -0400 Received: from mail-ua1-x930.google.com ([2607:f8b0:4864:20::930]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPJpv-0001Vg-Fj; Thu, 04 Jul 2024 06:37:13 -0400 Received: by mail-ua1-x930.google.com with SMTP id a1e0cc1a2514c-8101b144fddso143608241.3; Thu, 04 Jul 2024 03:37:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720089429; x=1720694229; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=AheajeWODKPx5YqMBqKLGiLEc6eghq5jj7LDYdjw4is=; b=QIdvi/lXPgWkz6SSWuIZrDBk3qaxpAlgOa4zL8OeoQX4/rqMUn63nWry282EenBqyf oRLgBlXlOJ6/H3LKPospgdYM3AFlPcB9u2i2hBIMzVyyFYvsqKGsHeN9/XmNJc5RteF2 SZx8uuJZWNoMKu81zR6HH4XQdDByHFyxuF/hZ4xwn4esgPk8w3kTN3TgiI3e9DTetY5U ThBSjguNVa+ia66hJf++3lLjxgIFHXEbJ5JHgEC12PMh3uTG8zTFJ94TbpQN2dIIK7KV 2nbOKaFFqUKXq0CrodMHXrzbGC9l809aqRA+bcAY1q6NnhUwo54S9nLexV3w2+/vbgHS dn9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720089429; x=1720694229; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AheajeWODKPx5YqMBqKLGiLEc6eghq5jj7LDYdjw4is=; b=bcbixK9gM8NQ7+TcK8GXdj7aPvd31f4RJQf5t01u1ILwXoJXVo/kyfVp2R+DEG5Dr/ bBFFZE5bWr0UU1q2PW34yHxWCZINt+RM/yBc07hCzqKTwL0G2MwXLxgV5/n7O0aRqwoq 7ZpApgUr+k4EEZLesq+NaMZHqnCfRjgYEhhjP7lepDFwjCnleBW2DPEWkHDu5qzLCCiZ dNUQzLoMOsaONKm4D2o60qe+Xxz3PSOhe6tSH3l8VnX6goLKeUCg7qsXWcG9DUdDGBMP QBlW9nMCEmjX+EWyPso7qTVi4hUwbKXIEueGM8DSgJsLEvUEEqqG9ePr1ylw44M3D2Vw jiRg== X-Forwarded-Encrypted: i=1; AJvYcCVnU79FDG3OlqE0PUEZ778+IuKKFp6DTigq4B3Wi6Q3nHMEBniVWzohTCt+wSWt3ag53Ai0ZU9OCTrdu4Opi9bYWoPcjEI= X-Gm-Message-State: AOJu0YyqvrFG28S4tO4V620dBjqMJR6+2AUGGx72lxw5tMkXIpfTjSU8 h+bAF1XkTaUuD/9BGutA0ZOTAcWRW+nUz1LQnPKHR+wliQljQQaN2spQWu/nnAWNizuyJh1zu4F OXix/cwHyci7HNHXOJtRA/zQpMgWAoBul X-Google-Smtp-Source: AGHT+IEpBcOKXgoI7MSJ68odXoNqViBzOcBJu4W2PBOgxVr0/jVhlweA++az4REcfPWbyEtat8mNdLc0YhiCFLxHN8U= X-Received: by 2002:a67:f842:0:b0:48f:e078:723d with SMTP id ada2fe7eead31-48fee66c25bmr1189828137.0.1720089429286; Thu, 04 Jul 2024 03:37:09 -0700 (PDT) MIME-Version: 1.0 References: <86ed921oxu.fsf@gnu.org> <874j9vllbp.fsf@localhost> <87o781t676.fsf@localhost> <874j9qs0wh.fsf@localhost> <87ed8mtyp0.fsf@localhost> <87msn7kffy.fsf@localhost> <87o77my9mp.fsf@localhost> <87y16j4nbe.fsf@localhost> In-Reply-To: <87y16j4nbe.fsf@localhost> From: Daniel Clemente Date: Thu, 4 Jul 2024 10:36:45 +0000 Message-ID: Subject: Re: org-encrypt-entries is slow (was: org-crypt leaking data when encryption password is not entered twice (was: Please document the caching and its user options)) To: Ihor Radchenko Cc: Eli Zaretskii , emacs-orgmode@gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::930; envelope-from=n142857@gmail.com; helo=mail-ua1-x930.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.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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: EA80B32913 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -8.24 X-Spam-Score: -8.24 X-TUID: Y/YjjtgLc93g > May you try > https://git.sr.ht/~yantar92/org-mode/log/feature/org-crypt-refactor branc= h? > Is encryption speed satisfactory then? With that code I see something strange: I opened a file which had encrypted :crypt: sections (never unencrypted), and after adding a space somewhere else and saving, it asked me for an encryption password. It shouldn't, since all sections are encrypted. I also see =E2=80=9Eorg-crypt: Re-encrypting all decrypted entries due to auto-save=E2=80=9C asking me for the encryption password. But I tried removing all :crypt: tags (I renamed them to something else), and saving a large file seems as slow as before. A few seconds (often 5 seconds; sometimes it's just 2 or 3; this was the case before too). Here's when it's 5, for 1 save: 4669 82% - command-execute 4076 72% - funcall-interactively 4055 72% - save-buffer 4051 71% - basic-save-buffer 3831 68% - run-hook-with-args-until-success 3831 68% - org-crypt--encrypt-and-mark-entries 3831 68% - org-encrypt-entries 3831 68% - org-scan-tags 3831 68% - org-element-cache-map 1859 33% - org-element--parse-to 848 15% + org-element--cache-put 655 11% + # 120 2% + org-element--cache-find 28 0% org-element--cache-active-p 20 0% # 16 0% org-element-type 4 0% # 4 0% # 1100 19% - # 804 14% - org-entry-get-with-inheritance 780 13% - org-element-lineage-map 720 12% - # 668 11% + org--property-local-values 12 0% org-element-begin 4 0% delq 36 0% + org-element--property 8 0% + org-element-type-p 4 0% functionp 8 0% org--property-get-separator 8 0% make-closure 208 3% + org-element--property 32 0% + org-get-tags 8 0% + org-element-begin 384 6% + org-element-at-point 164 2% re-search-forward 132 2% + # 44 0% + # 16 0% match-data 12 0% + org-element--property 8 0% + # 8 0% make-closure 4 0% buffer-base-buffer 4 0% + org-element-type-p 220 3% + basic-save-buffer-1 8 0% execute-extended-command 6 0% + org-delete-backward-char 3 0% + org-self-insert-command 3 0% + previous-line 1 0% + next-line 593 10% - byte-code I also see new problems (which would take me a long time to explain since I don't understand the code or the settings), where: - Org asks me for an encryption password even if there are no :crypt: tags. I just changed the only :crypt: tag to a :nocrypt: tag and saved - Org spends around 20 seconds trying to save the file, in a loop, reporting: (error "org-crypt: Encryption failed. Not saving the buffer. Error: GPG error: \"Encrypt failed\", \"Canceled; Exit\"")