emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ken Mankoff <mankoff@gmail.com>
To: Ken Mankoff <mankoff@gmail.com>, Org-mode <emacs-orgmode@gnu.org>
Subject: Re: Help speeding up Org iCal export
Date: Thu, 28 May 2020 07:06:30 -0700	[thread overview]
Message-ID: <CAFdBzEqndcjJU=4jb0MKr09Lu5WgQ5faW3mj2B7bufTKd+zxPQ@mail.gmail.com> (raw)
In-Reply-To: <875zcgz21l.fsf@nicolasgoaziou.fr>

[-- Attachment #1: Type: text/plain, Size: 3835 bytes --]

Hi Nicolas,

Thank you for providing suggestions about the appropriate tool. I've
profiled it, examined the variables you suggested, but am not sure what
next steps to take. I hope it is OK that I post questions about this on
this list...

On Thu, May 28, 2020 at 5:17 AM Nicolas Goaziou <mail@nicolasgoaziou.fr>
wrote:

> Ken Mankoff <mankoff@gmail.com> writes:
>
> > When I eval `(org-icalendar-combine-agenda-files nil)`, it takes about
> > 15 seconds.
>
> OK. You may want to profile this, or use ELP.
>

Output from the profiler is here: https://pastebin.com/QvL9w69R but the key
lines seems to be:

      - org-icalendar-combine-agenda-files                      15540  83%
       - apply                                                  15540  83%
        - org-icalendar--combine-files                          15540  83%
         - mapconcat                                            15536  83%
          - #<compiled 0x15879b1>                               15536  83%
           - org-export-as                                      15162  81%
            - org-export-data                                    6493  34%
             - mapconcat                                         6493  34%
              - #<compiled 0x25baf9d>                            6493  34%
               - org-export-data                                 6493  34%
                - mapconcat                                      6164  33%
                 - #<compiled 0x22864b5>                         6160  33%
                  - org-export-data                              6156  33%
                   - mapconcat                                   5674  30%

with org-export-data and mapconcat repeating, AND

                        - mapc                                   5672  30%
                         - #<compiled 0x3129c91>                 5672  30%
                          - mapc                                 5672  30%
                           - #<compiled 0x3129c91>               5668  30%
                            - #<compiled 0x15b2141>               4392  23%
                             - org-id-find                       4392  23%
                              - org-id-update-id-locations
4376  23%
                               - org-map-entries                 3696  19%
                                - org-scan-tags                  3668  19%
                                 + #<lambda 0x22c5233ea>                990
  5%
                                 + #<lambda 0x22c5233ea>                879
  4%
                                 + #<lambda 0x22c5233ea>                830
  4%



> Some strange messages in the *Messages* buffer include:

> >
> > 22 files scanned, 7 files contains IDs and in total 23 IDs found.
>
> You may have set `org-icalendar-store-UID' somehow.
>

It is set to nil. I have only the *scratch* buffer open, and no other
buffers (although some where open earlier in this emacs session).


> > But my `org-agenda-files` variable only contains 12 files and no
> > #+INCLUDE statements.
>
> ID scanning is not limited to agenda files. Org also scans files known
> to contain ID. E.g., if, during the session, you insert an ID in
> "foo.org", later scans (in the same session) will include "foo.org".
>
> See `org-id-files' (internal variable), and `org-id-extra-files', which
> may contain even more files.
>

`org-id-files` contained a subset of my agenda files plus a few extra
(total: 7 files, and these 7 plus my agenda files do not sum to 22). When I
set it to nil, nothing significant changed, but it was reset after running
`org-icalendar-combine-agenda-files` again.

`org-id-extra-files` was set to org-agenda-text-search-extra-files. When I
set it to nil, nothing significant changed. It does not get reset when
`org-icalendar-combine-agenda-files` is run.

  -k.

[-- Attachment #2: Type: text/html, Size: 6256 bytes --]

  reply	other threads:[~2020-05-28 14:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28  0:24 [O] Help speeding up Org iCal export Ken Mankoff
2020-05-28  8:11 ` Eric S Fraga
2020-05-28 12:17 ` Nicolas Goaziou
2020-05-28 14:06   ` Ken Mankoff [this message]
2022-01-20 22:57     ` Josh Moller-Mara

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='CAFdBzEqndcjJU=4jb0MKr09Lu5WgQ5faW3mj2B7bufTKd+zxPQ@mail.gmail.com' \
    --to=mankoff@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).