1

My agenda view processes many items with SCHEDULED and DEADLINE fields, and fully generates from scratch in about 0.3s. However, if I append CUSTOM_SCHEDULED<"<now>" to my agenda view definition, the same view takes 2.1s to generate. How can I add a custom time-like property in a way that does not wreck the performance of the view?

Profiler excerpt:

- org-tags-view                                  904  97%
 - org-scan-tags                                 888  95%
  - #<lambda 0x5be5aafca262231>                  838  90%
   - and                                         838  90%
    - progn                                      838  90%
     - or                                        837  90%
      - and                                      835  89%
       - not                                     835  89%
        - org-time<                              833  89%
         - or                                    831  89%
          - org-cached-entry-get                 831  89%
           - org-entry-properties                822  88%

As you can see, there is an explicit org-time< call that is causing the slowdown. What's interesting is that SCHEDULED and DEADLINE properties appear to use some other mechanism, since they do not cause the same hot loop in org-time<.

3
  • Have you profiled it?
    – NickD
    Apr 29, 2019 at 21:44
  • @NickD Good idea. I've included an excerpt from the profiler that highlights the distinction between built-in and custom properties. Apr 29, 2019 at 23:07
  • Matching properties other than the special ones (e.g. SCHEDULED) has always been slow (another example here)
    – erikstokes
    Apr 30, 2019 at 22:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.