From: David Maus <dmaus@ictsoc.de>
To: Daniel Clemente <n142857@gmail.com>
Cc: Org-mode Org-Mode <emacs-orgmode@gnu.org>
Subject: Re: Agenda is slow because of vc-mode
Date: Fri, 18 Jun 2010 18:19:48 +0200 [thread overview]
Message-ID: <8739wkxqhn.wl%dmaus@ictsoc.de> (raw)
In-Reply-To: <AANLkTilQeIxPEi2xsDZluGK1V3aBwT1FoRo3OGeZChQS@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1590 bytes --]
Daniel Clemente wrote:
>Hi.
> I have a shell script which exports my agenda to a file. It's pretty
>slow: about 90 seconds. There are many files (200 .org files, 76k
>lines, 3'6 Mb, 1600 open tasks) but the performance should be better.
> I found a way to bring it down to 11 seconds: temporarily disable
>the version control tools I'm using (bazaar, git). To test, just
>change their names so that Emacs can't run them.
> Since this slowness is caused by vc-mode, I wonder if it's possible
>for Org to open the agenda files without enabling vc-mode, for vc-mode
>is not necessary for org-mode.
> I fear not, because org-agenda-get-day-entries uses
>org-get-agenda-file-buffer to open a buffer normally, and this buffer
>should be fully functional for later usage.
That's indeed the problem: Its hard to figure a default options for
such functionality.
> As a hack, I used (defun vc-find-file-hook () nil) in my script;
>this does the trick.
Instead of overloading `vc-find-file-hook' you could use something
like this:
(defun dmj/disable-vc-for-agenda-files-hook ()
"Disable vc-mode for Org agenda files."
(if (and (fboundp 'org-agenda-file-p)
(org-agenda-file-p (buffer-file-name)))
(remove-hook 'find-file-hook 'vc-find-file-hook)
(add-hook 'find-file-hook 'vc-find-file-hook)))
(add-hook 'find-file-hook 'dmj/disable-vc-for-agenda-files-hook)
It removes vc-find-file-hook from the list of find-file-hooks when the
file is question is an agenda file.
HTH
-- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de
[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
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-06-18 16:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-07 12:25 Agenda is slow because of vc-mode Daniel Clemente
2010-06-18 16:19 ` David Maus [this message]
2010-06-18 19:16 ` Greg Troxel
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8739wkxqhn.wl%dmaus@ictsoc.de \
--to=dmaus@ictsoc.de \
--cc=emacs-orgmode@gnu.org \
--cc=n142857@gmail.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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).