From mboxrd@z Thu Jan 1 00:00:00 1970 From: jamil egdemir Subject: slow capture templates Date: Thu, 22 May 2014 03:07:25 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60943) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnN68-0002vA-QJ for emacs-orgmode@gnu.org; Thu, 22 May 2014 03:07:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WnN67-0008Mg-Gr for emacs-orgmode@gnu.org; Thu, 22 May 2014 03:07:28 -0400 Received: from mail-vc0-x22b.google.com ([2607:f8b0:400c:c03::22b]:59169) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnN67-0008ML-D3 for emacs-orgmode@gnu.org; Thu, 22 May 2014 03:07:27 -0400 Received: by mail-vc0-f171.google.com with SMTP id lc6so3872878vcb.16 for ; Thu, 22 May 2014 00:07:25 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi, 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: (org-version)"8.2.6" GNU Emacs 24.4.50.1 (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 amd64-1.ports.openbsd.org. 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 "~/workarea/personal/orgfiles/refile.org") "* 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 "~/workarea/personal/orgfiles/diary.org") "* %?\n%U\n" :clock-in t :clock-resume t) ("w" "org-protocol" entry (file "~/workarea/personal/orgfiles/refile.org") "* TODO Review %c\n%U\n" :immediate-finish t) ("m" "Meeting" entry (file "~/workarea/personal/orgfiles/refile.org") "* MEETING with %? :MEETING:\n%U" :clock-in t :clock-resume t) ("p" "Phone call" entry (file "~/workarea/personal/orgfiles/refile.org") "* PHONE %? :PHONE:\n%U" :clock-in t :clock-resume t) ("h" "Habit" entry (file "~/workarea/personal/orgfiles/refile.org") "* 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. -j -- ------------------------------------------------------------- Jamil Egdemir unclejamil@gmail.com http://www.power-quant.com (631) 338-3170 (cell) -------------------------------------------------------------