From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Maus Subject: Re: Agenda is slow because of vc-mode Date: Fri, 18 Jun 2010 18:19:48 +0200 Message-ID: <8739wkxqhn.wl%dmaus@ictsoc.de> References: Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/mixed; boundary="===============0465094231==" Return-path: Received: from [140.186.70.92] (port=45017 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OPeJk-0002kI-7r for emacs-orgmode@gnu.org; Fri, 18 Jun 2010 12:21:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OPeJj-0002L6-1z for emacs-orgmode@gnu.org; Fri, 18 Jun 2010 12:21:20 -0400 Received: from mysql1.xlhost.de ([213.202.242.106]:36246) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OPeJi-0002Kn-R6 for emacs-orgmode@gnu.org; Fri, 18 Jun 2010 12:21:18 -0400 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Daniel Clemente Cc: Org-mode Org-Mode --===============0465094231== Content-Type: multipart/signed; boundary="pgp-sign-Multipart_Fri_Jun_18_18:19:47_2010-1"; micalg=pgp-sha256; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit --pgp-sign-Multipart_Fri_Jun_18_18:19:47_2010-1 Content-Type: text/plain; charset=US-ASCII 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 --pgp-sign-Multipart_Fri_Jun_18_18:19:47_2010-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iF4EABEIAAYFAkwbnKMACgkQma24O1pEeObXoAD/adIpg9StOM7VFLrrcEAOH0ha F0Jo32WxZrTtjGXixcAA/3XjIGkU7zzY+x5b/PNj+zqulGNpX+a/OMWw8YiV7CaC =r+uU -----END PGP SIGNATURE----- --pgp-sign-Multipart_Fri_Jun_18_18:19:47_2010-1-- --===============0465094231== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============0465094231==--