[Top][All Lists]

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

[O] slow capture templates

From: jamil egdemir
Subject: [O] slow capture templates
Date: Thu, 22 May 2014 03:07:25 -0400


I'm running into very slow capture templates since this morning with a
good 10-20 second delay each time I try to invoke them.  After
instrumenting org with elp and examining the results I get:

org-capture                                                   1
   42.157791853  42.157791853
org-capture-fill-template                                     1
   40.939494541  40.939494541
org-get-x-clipboard                                           5
   40.895240381  8.1790480762
org-get-x-clipboard-compat                                    5
   40.895134778  8.1790269558
org-capture-select-template                                   1
   1.168859672   1.168859672
org-mks                                                       1
   1.168828382   1.168828382
org-mode                                                      1
   0.043022998   0.043022998
org-install-agenda-files-menu                                 1
   0.041738898   0.041738898
org-agenda-files                                              2
   0.041651735   0.0208258675
org-current-time                                              2
   0.033159385   0.0165796925
org-capture-place-template                                    1
   0.009962929   0.009962929

Looks like those top four calls in the list are burning up a huge
amount of time.  The delay is independent of the particular template I
use and also occurs when I start up emacs without an init (emacs -q).

I'm working on OpenBSD 5.4.

Emacs and Org-mode version info:
GNU Emacs (x86_64-unknown-openbsd5.4, GTK+ Version 3.8.2)

This particular emacs was built from source pulled just this morning.
The delay in the capture templates is also present when using the
emacs from the OpenBSD package: (GNU Emacs 24.3.1
(x86_64-unknown-openbsd, GTK+ Version 3.8.2) of 2013-07-23 on

I pushed the same org files and configurations to an ubuntu box and
tried the same profiling exercise with elp on emacs (24.3.1) with
org-mode 7.9.3f and the capture templates were quick and snappy.

My capture templates from my .emacs:

;; Capture templates for: TODO tasks, Notes, appointments, phone
calls, meetings, and org-protocol
(setq org-capture-templates
      (quote (("t" "todo" entry (file "~/workarea/personal/orgfiles/refile.org")
               "* TODO %?\n%U\n%a\n" :clock-in t :clock-resume t)
              ("r" "respond" entry (file
               "* NEXT Respond to %:from on %:subject\nSCHEDULED:
%t\n%U\n%a\n" :clock-in t :clock-resume t :immediate-finish t)
              ("n" "note" entry (file "~/workarea/personal/orgfiles/refile.org")
               "* %? :NOTE:\n%U\n%a\n" :clock-in t :clock-resume t)
              ("j" "Journal" entry (file+datetree
               "* %?\n%U\n" :clock-in t :clock-resume t)
              ("w" "org-protocol" entry (file
               "* TODO Review %c\n%U\n" :immediate-finish t)
              ("m" "Meeting" entry (file
               "* MEETING with %? :MEETING:\n%U" :clock-in t :clock-resume t)
              ("p" "Phone call" entry (file
               "* PHONE %? :PHONE:\n%U" :clock-in t :clock-resume t)
              ("h" "Habit" entry (file
               "* NEXT %?\n%U\n%a\nSCHEDULED: %(format-time-string
\"<%Y-%m-%d %a .+1d/3d>\")\n:PROPERTIES:\n:STYLE:
habit\n:REPEAT_TO_STATE: NEXT\n:END:\n"))))

Anyone have any ideas on how I can correct this problem?  The elisp in
those top four functions from the profile is beyond me.


Jamil Egdemir
(631) 338-3170 (cell)

reply via email to

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