From mboxrd@z Thu Jan 1 00:00:00 1970 From: JI Xiang Subject: Ridiculously long (2 minutes) startup time for org agenda Date: Sun, 18 Feb 2018 13:38:42 +0100 Message-ID: <54c5ef75-acac-22c6-9d6f-9b1399ce281d@xiangji.me> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39636) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1enOx3-0006RC-Gv for emacs-orgmode@gnu.org; Sun, 18 Feb 2018 08:24:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1enOx0-0004jD-PX for emacs-orgmode@gnu.org; Sun, 18 Feb 2018 08:24:21 -0500 Received: from sender-of-o52.zoho.com ([135.84.80.217]:21436) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1enOx0-0004a4-7F for emacs-orgmode@gnu.org; Sun, 18 Feb 2018 08:24:18 -0500 Content-Language: en-US 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" To: emacs-orgmode@gnu.org Hello, first time posting on the mailing list. I encountered a problem=20 where my agenda view (`C-c a a`) is taking ridiculously long (nearly 2=20 minutes) to be shown the first time. From the second time onwards, the=20 time is about 11 seconds, which is still very long by any means. I wondered whether it has something to do with me having many files in=20 the agenda list, so I tried to restrict the list to just one file. But=20 still the first call to org-agenda-list took 12 seconds. This shouldn't=20 be normal, right? The following are shown in the `Messages` buffer during the call. ``` Press key for agenda command: Restoring clock data Loading /home/jx/.emacs.d/.cache/org-clock-save.el (source)...done [yas] Prepared just-in-time loading of snippets successfully. Importmagic and/or epc not found. importmagic.el will not be working. Setting up indent for shell type zsh Indentation variables are now local. Indentation setup for shell type zsh Using vacuous schema Shell native completion is disabled, using fallback ``` I'm not sure why they would be there, especially the "using vacuous=20 schema" and "shell native completion" part. Are the messages related to=20 some `#BEGIN_SRC` blocks in the org files? I don't think I would ever=20 need source code blocks when I'm viewing an agenda buffer? I posted the question [on=20 Emacs.SE](https://emacs.stackexchange.com/questions/30489/what-could-cause-= org-agenda-to-take-very-long-to-start-up)=20 and somebody suggested me use `elp-instrument` to perform a profiling.=20 The results are as follows: ``` =C2=A0=C2=A0=C2=A0 Function Name, Call Count, Elapsed Time, Average Time =C2=A0=C2=A0=C2=A0 org-agenda 1=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 116.6048159=C2=A0=C2=A0 116.6048159 =C2=A0=C2=A0=C2=A0 org-agenda-list 1=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 116.29427357=C2=A0 116.29427357 =C2=A0=C2=A0=C2=A0 org-agenda-prepare 1=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 109.15345470=C2=A0 109.15345470 =C2=A0=C2=A0=C2=A0 org-agenda-prepare-buffers 1=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 108.98258905=C2=A0 108.98258905 =C2=A0=C2=A0=C2=A0 org-agenda-get-day-entries 1288=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 7.0089191339=C2=A0 0.0054417074 =C2=A0=C2=A0=C2=A0 org-agenda-get-scheduled 1288=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 3.726361062=C2=A0=C2=A0 0.0028931374 =C2=A0=C2=A0=C2=A0 org-agenda-get-deadlines 1288=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 2.1579713230=C2=A0 0.0016754435 =C2=A0=C2=A0=C2=A0 org-agenda--timestamp-to-absolute 14544=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 1.1317418120=C2=A0=20 7.781...e-05 =C2=A0=C2=A0=C2=A0 org-agenda-get-timestamps 1288=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 0.3673404320=C2=A0 0.0002852021 =C2=A0=C2=A0=C2=A0 org-agenda-get-sexps 1288=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 0.3438970410=C2=A0 0.0002670008 =C2=A0=C2=A0=C2=A0 org-agenda-get-restriction-and-command 1=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0.310503975=C2=A0=C2=A0=20 0.310503975 =C2=A0=C2=A0=C2=A0 org-agenda-get-blocks 1288=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 0.3083237900=C2=A0 0.0002393818 =C2=A0=C2=A0=C2=A0 org-agenda-prepare-window 1=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0.157091024=C2=A0=C2=A0 0.157091024 =C2=A0=C2=A0=C2=A0 org-agenda-skip 8624=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 0.0781296389=C2=A0 9.059...e-06 =C2=A0=C2=A0=C2=A0 org-agenda-files 49=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 0.026090686=C2=A0=C2=A0 0.0005324629 =C2=A0=C2=A0=C2=A0 org-agenda-finalize 1=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 0.013325178=C2=A0=C2=A0 0.013325178 =C2=A0=C2=A0=C2=A0 org-agenda-mode 1=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 0.009848546=C2=A0=C2=A0 0.009848546 =C2=A0=C2=A0=C2=A0 org-agenda-finalize-entries 23=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0.006178961=C2=A0=C2=A0 0.0002686504 =C2=A0=C2=A0=C2=A0 org-agenda-today-p 2604=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 0.0061717839=C2=A0 2.370...e-06 =C2=A0=C2=A0=C2=A0 org-agenda-skip-eval 16968=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 0.0052723920=C2=A0 3.107...e-07 =C2=A0=C2=A0=C2=A0 org-agenda-highlight-todo 112=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 0.0039840550=C2=A0 3.557...e-05 =C2=A0=C2=A0=C2=A0 org-agenda-format-item 112=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 0.0038309749=C2=A0 3.420...e-05 =C2=A0=C2=A0=C2=A0 org-agenda-new-marker 208=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 0.0031529359=C2=A0 1.515...e-05 =C2=A0=C2=A0=C2=A0 org-agenda-format-date-aligned 28=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0.0007373120=C2=A0 2.633...e-05 =C2=A0=C2=A0=C2=A0 org-agenda-add-time-grid-maybe 28=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0.0003810809=C2=A0 1.361...e-05 =C2=A0=C2=A0=C2=A0 org-agenda-fix-displayed-tags 112=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 0.000342384=C2=A0=C2=A0 3.057e-06 =C2=A0=C2=A0=C2=A0 org-agenda-fontify-priorities 1=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0.00018465=C2=A0=C2=A0=C2=A0 0.0001846= 5 =C2=A0=C2=A0=C2=A0 org-agenda-align-tags 1=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0.000160119=C2=A0=C2=A0 0.000160119 =C2=A0=C2=A0=C2=A0 org-agenda-get-day-face 28=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 0.000156385=C2=A0=C2=A0 5.585...e-06 =C2=A0=C2=A0=C2=A0 org-agenda-get-category-icon 112=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 7.702...e-05=C2=A0 6.877...e-07 =C2=A0=C2=A0=C2=A0 org-agenda-span-name 23=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 4.4484e-05=C2=A0=C2=A0=C2=A0 1.934...e-06 =C2=A0=C2=A0=C2=A0 org-agenda-span-to-ndays 1=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 2.3496e-05=C2=A0=C2=A0=C2=A0 2.3496e-05 =C2=A0=C2=A0=C2=A0 org-agenda-fit-window-to-buffer 1=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 2.0877e-05=C2=A0=C2=A0=C2=A0 2.0877= e-05 =C2=A0=C2=A0=C2=A0 org-agenda-time-of-day-to-ampm-maybe 21=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 1.124...e-05=C2=A0=20 5.353...e-07 =C2=A0=C2=A0=C2=A0 org-agenda-set-mode-name 1=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 9.226e-06=C2=A0=C2=A0=C2=A0=C2=A0 9.226e-= 06 =C2=A0=C2=A0=C2=A0 org-agenda-mark-header-line 1=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 8.774e-06=C2=A0=C2=A0=C2=A0=C2=A0 8.77= 4e-06 =C2=A0=C2=A0=C2=A0 org-agenda-reset-markers 1=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 4.829e-06=C2=A0=C2=A0=C2=A0=C2=A0 4.829e-= 06 =C2=A0=C2=A0=C2=A0 org-agenda-deadline-face 4=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 4.761e-06=C2=A0=C2=A0=C2=A0=C2=A0 1.19025= e-06 =C2=A0=C2=A0=C2=A0 org-agenda-update-agenda-type 1=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 1.575e-06=C2=A0=C2=A0=C2=A0=C2=A0 1.57= 5e-06 =C2=A0=C2=A0=C2=A0 org-agenda-ndays-to-span 2=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 1.174e-06=C2=A0=C2=A0=C2=A0=C2=A0 5.87e-0= 7 =C2=A0=C2=A0=C2=A0 org-agenda-mark-clocking-task 1=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 7.16e-07=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= 7.16e-07 =C2=A0=C2=A0=C2=A0 org-agenda-use-sticky-p 1=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 5.02e-07=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 5.02e= -07 ``` I'm not sure if that says much though. Version information: - Emacs: `GNU Emacs 27.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version=20 3.18.9) of 2018-02-18` - Orgmode: `Org mode version 9.1.6 (9.1.6-44-ge6f891-elpaplus @=20 /home/jx/.emacs.d/elpa/develop/org-plus-contrib-20180205/)`. - I'm using [Spacemacs'](https://github.com/syl20bnr/spacemacs) develop=20 branch. However, this problem happens on both Ubuntu 16.04 LTS and the latest=20 MacOS. Actually it has persisted for a very long period of time so I=20 doubt if it's related to any particular Emacs/Org version. Any help would be much appreciated! Best regards, Xiang