From: Daniel Clemente <n142857@gmail.com>
To: "Sébastien Vauban" <wxhgmqzgwmuf@spammotel.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Re: Having (too) many files in org-agenda-files
Date: Wed, 06 Oct 2010 16:47:13 +0200 [thread overview]
Message-ID: <87sk0js7im.wl%n142857@gmail.com> (raw)
In-Reply-To: <87eicbb1n1.fsf@mundaneum.com>
Do you have your .org files inside a version control system like git or bzr?
In that case, it's vc-mode who is delaying too much.
See the thread http://www.mail-archive.com/emacs-orgmode@gnu.org/msg25902.html for a dirty workaround (disabling vc-mode).
In my system I have now 200 agenda files (120k lines, 5'6 Mb) and I must wait 1 minute on a fast computer (1'45" on a slower one) to run org-agenda-list.
I timed it closing all *.org and running: time emacsclient -n --eval '(org-agenda-list)'
The problem is in vc-mode, not org. It is too slow. And what is exactly doing? I attach it at the end of this mail. Sometimes it's ls-files, other diff-index.
-- Daniel
#+begin_example
Debugger entered--Lisp error: (quit)
call-process("git" nil (t nil) nil "ls-files" "-c" "-z" "--" "wiki/Imagen.org")
apply(call-process "git" nil (t nil) nil ("ls-files" "-c" "-z" "--" "wiki/Imagen.org"))
process-file("git" nil (t nil) nil "ls-files" "-c" "-z" "--" "wiki/Imagen.org")
apply(process-file "git" nil (t nil) nil "ls-files" ("-c" "-z" "--" "wiki/Imagen.org"))
vc-git--call((t nil) "ls-files" "-c" "-z" "--" "wiki/Imagen.org")
apply(vc-git--call (t nil) "ls-files" ("-c" "-z" "--" "wiki/Imagen.org"))
vc-git--out-ok("ls-files" "-c" "-z" "--" "wiki/Imagen.org")
byte-code(…)
vc-git-registered("/home/dc/.mirp/wiki/Imagen.org")
apply(vc-git-registered "/home/dc/.mirp/wiki/Imagen.org")
vc-call-backend(Git registered "/home/dc/.mirp/wiki/Imagen.org")
#[…]
mapc(#[(b) "…" [b file vc-call-backend registered vc-file-setprop vc-backend throw found t] 4] (RCS CVS SVN SCCS Bzr Git Hg Mtn Arch))
byte-code("…")
vc-registered("/home/dc/.mirp/wiki/Imagen.org")
vc-backend("/home/dc/.mirp/wiki/Imagen.org")
#[…]
vc-find-file-hook()
run-hooks(find-file-hook)
after-find-file(nil t)
find-file-noselect-1(#<buffer Imagen.org> "~/wiki/Imagen.org" nil nil "~/wiki/Imagen.org" (5929158 19))
find-file-noselect("/home/dc/.mirp/wiki/Imagen.org" nil nil nil)
find-file("/home/dc/.mirp/wiki/Imagen.org")
#+end_example
El Thu, 30 Sep 2010 19:08:02 +0200 Sébastien Vauban va escriure:
>
> Hi Nick,
>
> Nick Dokos wrote:
> > Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> wrote:
> >>>>> Also, you might consider to remove (org-agenda-list) from .emacs. I
> >>>>> think it is pretty much always a bad idea to put a command like this
> >>>>> into your startup. Just make it a habit to call it early after starting
> >>>>> Emacs.
> >>>>
> >>>> Honestly, that would not change that much. Having to wait 92 seconds at
> >>>> startup, or a long time just a few minutes later has the same impact for
> >>>> me.
> >
> > Maybe you should try adding a call to the profiler to your .emacs
> > and try to measure e.g. how much the font locking costs. Off the top of
> > my head and entirely untested, adding
> >
> > ,----
> > | (require 'elp)
> > | (elp-instrument-package "font-lock")
> > |
> > | ;; rest of your .emacs
> > |
> > | (elp-results)
> > `----
> >
> > might be enough.
>
> Here are the results.
>
> --8<---------------cut here---------------start------------->8---
> font-lock-fontify-buffer 96 15.383627999 0.1602461249
> font-lock-default-fontify-buffer 96 15.378296000 0.1601905833
> font-lock-fontify-region 96 15.284044000 0.1592087916
> font-lock-default-fontify-region 96 15.282674000 0.1591945208
> font-lock-fontify-keywords-region 96 15.184516 0.1581720416
> font-lock-prepend-text-property 8608 0.2712220000 3.150...e-05
> font-lock-unfontify-region 96 0.0859729999 0.0008955520
> font-lock-add-keywords 166 0.0800819999 0.0004824216
> font-lock-compile-keywords 138 0.0671930000 0.0004869057
> font-lock-default-unfontify-region 96 0.0378660000 0.0003944375
> font-lock-mode 142 0.0344680000 0.0002427323
> font-lock-default-function 142 0.028445 0.0002003169
> font-lock-mode-internal 73 0.0272529999 0.0003733287
> font-lock-turn-on-thing-lock 73 0.0238939999 0.0003273150
> font-lock-compile-keyword 5505 0.0225559999 4.097...e-06
> font-lock-set-defaults 525 0.0174539999 3.324...e-05
> font-lock-remove-keywords 130 0.0018569999 1.428...e-05
> font-lock-change-mode 33 0.0016060000 4.866...e-05
> font-lock-eval-keywords 81 0.0012500000 1.543...e-05
> font-lock-value-in-major-mode 187 0.0003879999 2.074...e-06
> font-lock-extend-region-wholelines 96 0.000309 3.21875e-06
> font-lock-extend-region-multiline 96 0.0002549999 2.656...e-06
> font-lock-extend-jit-lock-region-after-change 28 0.0002529999 9.035...e-06
> font-lock-after-fontify-buffer 96 0.0002499999 2.604...e-06
> font-lock-choose-keywords 41 8.899...e-05 2.170...e-06
> font-lock-update-removed-keyword-alist 36 6.8e-05 1.888...e-06
> --8<---------------cut here---------------end--------------->8---
>
> with 94 files in my =org-agenda-files=. Yes, 94, not 96?
>
> You can effectively see that =font-lock-*= is taking me 15s during my Emacs
> startup.
>
> Though, I don't know what's the next action to be taken from this observation.
> Can you guide me?
>
> Best regards,
> Seb
>
> --
> Sébastien Vauban
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
next prev parent reply other threads:[~2010-10-06 14:47 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-28 18:45 Having (too) many files in org-agenda-files Sébastien Vauban
2010-09-28 20:19 ` Matt Lundin
2010-09-29 21:21 ` Sébastien Vauban
2010-09-29 3:39 ` Shelagh Manton
2010-09-29 8:52 ` Sébastien Vauban
2010-09-29 3:56 ` Carsten Dominik
2010-09-29 8:32 ` Sébastien Vauban
2010-09-29 13:19 ` Carsten Dominik
2010-09-29 22:20 ` Sébastien Vauban
2010-09-30 11:24 ` Carsten Dominik
2010-09-30 11:53 ` Sébastien Vauban
2010-09-30 15:33 ` Nick Dokos
2010-09-30 17:08 ` Sébastien Vauban
2010-09-30 17:37 ` Carsten Dominik
2010-12-01 19:46 ` Sébastien Vauban
2010-12-01 23:00 ` Eric S Fraga
[not found] ` <17540.1291246717@gamaville.americas.hpqcorp.net>
2010-12-02 8:57 ` Eric S Fraga
2010-12-02 9:25 ` Sébastien Vauban
2010-12-12 18:28 ` David Maus
2010-12-02 3:10 ` Jeff Horn
2010-12-02 9:15 ` Sébastien Vauban
2010-10-06 14:47 ` Daniel Clemente [this message]
2010-09-30 13:37 ` Sébastien Vauban
2010-09-30 13:41 ` Carsten Dominik
2010-09-29 12:38 ` Matt Lundin
2010-09-29 12:47 ` Matthew Lundin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sk0js7im.wl%n142857@gmail.com \
--to=n142857@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=wxhgmqzgwmuf@spammotel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.