emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@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, 29 Sep 2010 15:19:18 +0200	[thread overview]
Message-ID: <BEA81F30-1856-4FA5-8C80-75655E95A3D5@gmail.com> (raw)
In-Reply-To: <877hi56jc0.fsf@mundaneum.com>


On Sep 29, 2010, at 10:32 AM, Sébastien Vauban wrote:

> Hi Carsten,
>
> Carsten Dominik wrote:
>> On Sep 28, 2010, at 8:45 PM, Sébastien Vauban wrote:
>>> Of course, I have many, many files in Org mode. All files I write  
>>> (or touch)
>>> in fact.
>>>
>>> Of course, I would like to search through my files at some point  
>>> in time. I
>>> even would like to search through your files at some point in  
>>> time, I mean
>>> through =org-mode/contrib/babel= and =Worg= for example. Hence, I  
>>> put them
>>> in =org-agenda-files=.
>>>
>>> The problem is the load-time of my Emacs, now 221 seconds, coming  
>>> from 20
>>> seconds before the heavy use of Org...
>>>
>>> You'll tell me: not a problem, you do that only once a day, and  
>>> you use
>>> Emacs client/server for the rest of the time. True. A bit, because I
>>> sometimes have to restart Emacs for testing a fresh one (not  
>>> impacted by
>>> defvars already defined, or deffaces, etc.).
>>>
>>> Having to wait almost 4 minutes is a real pain. So, here my
>>> comments/questions:
>>>
>>> - Isn't it possible to delay the fontification/ispell/etc. to when  
>>> we
>>>  really display (i.e., pop up) the buffer? I guess this must be a  
>>> major
>>>  component of the time this takes.
>>>
>>> - Couldn't we have 2 vars: =org-agenda-files= for the files you  
>>> know you
>>>  want have scanned for the agenda construction, and an extra list  
>>> such as
>>>  =org-search-files= for files not containing any dates? Then, some  
>>> time
>>>  would have to be taken when =C-c a s=, but not before. And not if  
>>> you
>>>  don't search for anything in your Org files during that Emacs  
>>> session...
>>
>> 4 minutes of startup time is entirely unacceptable.  And I think
>> you need to identify what is causing this.
>>
>> First of all, unless you are having to totally old Version of Emacs,
>
> Nope. GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0)
> of 2010-03-29 on rothera, modified by Debian
>
>
>> fontification at display time is standard, I believe.
>
> It seems not, from what I see in the Messages buffer. I really don't  
> have the
> impression of having fiddled with that, really.
>
>
>> You must be doing something strange, like forcing Emacs to load
>> all those files in org-agenda-files for example,
>
> That, yes!  I should have explicitly written it, but -- yes -- I do  
> have:
>
> --8<---------------cut here---------------start------------->8---
> (org-agenda-list)
> --8<---------------cut here---------------end--------------->8---
>
> in my .emacs.
>
>
>> and maybe forcing global fontification for each file or so.
>
> To repeat myself, no to that question. But ispell and flyspell are  
> called for
> Org files. Maybe there are interactions?
>
>
>> About a separate variable for search file, that does of cause exist:
>> org-agenda-text-search-extra-files
>
> Of course!
>
> Doing this:
>
> --8<---------------cut here---------------start------------->8---
> (setq org-agenda-files
>      (append (directory-files org-directory t "^[^\\.].*\\.org$")
>              (if (file-exists-p "~/Projects/")
>                  (directory-files "~/Projects/" t "^[^\\.].*\\.org$")
>                nil)))
>
> (setq org-agenda-text-search-extra-files
>      (append
>              (if (file-exists-p "~/Public/")
>                  (directory-files "~/Public/" t "^[^\\.].*\\.txt$")
>                nil)
>              (if (file-exists-p "~/Public/www.mygooglest.com/source/sva/ 
> ")
>                  (directory-files "~/Public/www.mygooglest.com/source/sva/ 
> " t "^[^\\.].*\\.txt$")
>                nil)
>              (if (file-exists-p "~/Examples/Org-scraps/")
>                  (directory-files "~/Examples/Org-scraps/" t "^[^\ 
> \.].*\\.txt$")
>                nil)
>              (if (file-exists-p "~/Downloads/emacs/site-lisp/org- 
> mode/contrib/babel/")
>                  (directory-files "~/Downloads/emacs/site-lisp/org- 
> mode/contrib/babel/" t "^[^\\.].*\\.org$")
>                nil)
>              (if (file-exists-p "~/Downloads/emacs/site-lisp/Worg/")
>                  (directory-files "~/Downloads/emacs/site-lisp/ 
> Worg/" t "^[^\\.].*\\.org$")
>                nil)
>              ))
> --8<---------------cut here---------------end--------------->8---
>
> reduces my load time from 221 seconds down to 92 seconds. Already a  
> huge diff!

Still bad though.  I am wondering what is causing the fontification  
message.
I do not get this, so it must be something in your setup.  You should
try to find out when this is happening and why.

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.

It also seems to me you some of the extra packages might be
activated several times in each file.  One possible reason could
be that you have put the code to turn them on into several hooks
like text-mode-hook, outline-mode-hook, and org-mode-hook.
Turning on org-mode will first run text-mode-hook, then
outline-mode-hook, then org-mode-hook .....
Maybe you are also calling font-lock-fontify-buffer explicitly
in one of your hooks?

Hope some of this helps.  If not, let me see you full
configuration - maybe I can spot something else.

- Carsten

  reply	other threads:[~2010-09-29 13:19 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 [this message]
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
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

  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=BEA81F30-1856-4FA5-8C80-75655E95A3D5@gmail.com \
    --to=carsten.dominik@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 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).