emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Daniel Clemente <n142857@gmail.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-orgmode@gnu.org
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))
Date: Tue, 2 Jul 2024 16:54:19 +0000	[thread overview]
Message-ID: <CAJKAhPA5vVjETRyhV-_QP7T7mKuDLAj86Gn1wP3LgDD82QT-Mg@mail.gmail.com> (raw)
In-Reply-To: <87o77my9mp.fsf@localhost>

> > For instance, I don't use it because it adds around 5 seconds to each
> > saving of a large file. If it were instantaneous I would enable it.
> > With it disabled, this explains why I often find unencrypted sections
> > at the end of the day… I have to rely on myself to reencrypt them
> > again.
>
> Does it also happen when you use the latest Org mode version?
>

Yes, with today's build. It happens with an 11 Mb Org file which has
19721 headers (some of them reach level 13).
Here I enabled the profiler, added a space, saved (1 time only), and
reported CPU. It took around 5 seconds.

        4616  89% - command-execute
        4349  84%  - funcall-interactively
        4127  80%   - save-buffer
        4127  80%    - basic-save-buffer
        3931  76%     - run-hooks
        3931  76%      - org-encrypt-entries
        3931  76%       - org-scan-tags
        3931  76%        - org-element-cache-map
        1764  34%         - org-element--parse-to
         868  16%          - org-element--cache-put
         848  16%           - avl-tree-enter
         840  16%            - avl-tree--do-enter
         792  15%             - avl-tree--do-enter
         748  14%              - avl-tree--do-enter
         688  13%               - avl-tree--do-enter
         632  12%                - avl-tree--do-enter
         576  11%                 + avl-tree--do-enter
          52   1%                 + org-element--cache-compare
          56   1%                + org-element--cache-compare
          44   0%               + org-element--cache-compare
           4   0%                 avl-tree--node-branch
          44   0%              + org-element--cache-compare
          48   0%             + org-element--cache-compare
         580  11%          - #<native-comp-function
F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_38>
         448   8%           + org-element-headline-parser
          20   0%           + org-element-section-parser
           4   0%             org-element-type
         136   2%          + org-element--cache-find
          20   0%            #<native-comp-function
F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_12>
          16   0%            org-element-type
          12   0%            throw
           8   0%          + #<native-comp-function
F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_15>
           8   0%          + #<native-comp-function
F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_18>
           4   0%            org-element--cache-active-p
        1161  22%         - #<byte-code-function FF1>
         857  16%          - org-entry-get-with-inheritance
         797  15%           + org-element-lineage-map
           8   0%             org-element-at-point
           8   0%             make-closure
           8   0%             org--property-get-separator
           4   0%             mapconcat
         184   3%          + org-element--property
          16   0%          + org-get-tags
           8   0%          + org-encrypt-entry
           8   0%            org-element-begin
           4   0%            #<byte-code-function 99A>
           4   0%            functionp
         446   8%         + org-element-at-point
         200   3%           re-search-forward
         124   2%         + #<native-comp-function
F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_66>
          44   0%         + #<native-comp-function
F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_9>
          28   0%           match-data
          12   0%           make-closure
           8   0%         + org-element--property
           4   0%           #<native-comp-function
F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_15>
           4   0%           org-element-type-p
           4   0%           #<native-comp-function
F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_18>
           4   0%           throw
         196   3%     + basic-save-buffer-1


  reply	other threads:[~2024-07-02 16:55 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-12  9:38 Please document the caching and its user options Eli Zaretskii
2024-06-14 13:12 ` Ihor Radchenko
2024-06-14 13:41   ` Eli Zaretskii
2024-06-14 15:31     ` Ihor Radchenko
2024-06-14 15:56       ` Eli Zaretskii
2024-06-15 12:47         ` Ihor Radchenko
2024-06-15 13:01           ` Eli Zaretskii
2024-06-15 14:13             ` Ihor Radchenko
2024-06-15 14:37               ` Eli Zaretskii
2024-06-16  9:05                 ` Ihor Radchenko
2024-06-16 10:41                   ` Eli Zaretskii
2024-06-23  9:12                     ` Björn Bidar
2024-06-15 13:47           ` Ihor Radchenko
2024-06-14 13:56   ` Jens Lechtenboerger
2024-06-14 14:31     ` Publishing cache (was: Please document the caching and its user options) Ihor Radchenko
2024-06-16  5:40   ` Please document the caching and its user options Daniel Clemente
2024-06-16 12:36     ` Ihor Radchenko
2024-06-17 12:41       ` Daniel Clemente
2024-06-18 15:53         ` Ihor Radchenko
2024-06-18 16:15           ` Eli Zaretskii
2024-06-18 16:25             ` Ihor Radchenko
2024-06-18 16:33               ` Eli Zaretskii
2024-06-18 16:55                 ` Ihor Radchenko
2024-06-19  9:27                   ` Colin Baxter
2024-06-19 10:35                     ` Ihor Radchenko
2024-06-19 13:04                       ` Eli Zaretskii
2024-06-19 13:30                         ` Ihor Radchenko
2024-06-19 16:07                           ` Colin Baxter
2024-06-19 16:15                             ` Ihor Radchenko
2024-06-18 22:06               ` Rudolf Adamkovič
2024-06-19  4:29                 ` tomas
2024-06-23 11:45           ` Daniel Clemente
2024-06-24 10:36             ` Ihor Radchenko
2024-06-26 12:59               ` Daniel Clemente
2024-06-26 13:21                 ` org-crypt leaking data when encryption password is not entered twice (was: Please document the caching and its user options) Ihor Radchenko
2024-06-27  8:55                   ` Daniel Clemente
2024-06-27 10:15                     ` 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)) Ihor Radchenko
2024-07-02 16:54                       ` Daniel Clemente [this message]
2024-07-02 19:16                         ` Ihor Radchenko
2024-07-04 10:36                           ` Daniel Clemente
2024-06-27 10:34                     ` org-crypt leaking data when encryption password is not entered twice (was: Please document the caching and its user options) Ihor Radchenko
2024-07-02 16:53                       ` Daniel Clemente
2024-06-27  9:27                 ` Please document the caching and its user options Eli Zaretskii
2024-06-27 10:11                   ` Ihor Radchenko
2024-06-27 10:30                     ` Eli Zaretskii
2024-06-28 12:54                     ` Rudolf Adamkovič
2024-06-28 15:31                       ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJKAhPA5vVjETRyhV-_QP7T7mKuDLAj86Gn1wP3LgDD82QT-Mg@mail.gmail.com \
    --to=n142857@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).