emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help speeding up Org iCal export


From: Ken Mankoff
Subject: Re: Help speeding up Org iCal export
Date: Thu, 28 May 2020 07:06:30 -0700

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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]