emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Lundin <mdl@imapmail.org>
To: "Sébastien Vauban"
	<public-wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@plane.gmane.org>
Cc: public-emacs-orgmode-mXXj517/zsQ@plane.gmane.org
Subject: Re: Having (too) many files in org-agenda-files
Date: Tue, 28 Sep 2010 16:19:36 -0400	[thread overview]
Message-ID: <878w2ld3jb.fsf@fastmail.fm> (raw)
In-Reply-To: <878w2lso50.fsf@mundaneum.com> ("Sébastien Vauban"'s message of "Tue, 28 Sep 2010 20:45:31 +0200")



Sébastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
writes:

> 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.
>

The drawback of org-mode's plain text format is that org-mode needs to
load, parse, and fontify, and preserve in memory all files it queries
(i.e., agenda files). Too many agenda files can thus cause a pretty big
performance hit (both when loading agenda files and constructing agenda
views). To avoid this, I would recommend including only important files
in org-agenda-files. Possible solutions for searching other files
include:

1. loading the other directories when needed (e.g., through a function
   that changes the value of org-agenda-files)
2. using the variable org-agenda-text-search-extra-files (see below)
3. searching other directories with external tools (grep, perl script,
   etc.)

> The problem is the load-time of my Emacs, now:
>
> Emacs Init startup time: 221 seconds.

Do you invoke an agenda command in your emacs, such as
org-agenda-to-appt? That would cause org-mode to load all org files.

> coming from 20 seconds before the heavy use of Org...
>
> with tens of times such lines in my *Messages* buffer:
>
> OVERVIEW
> Checking for library `filladapt'...
> +-> Requiring `filladapt' (already loaded)
> Checking for library `filladapt'... Found
> Fontifying Axa.org... (regexps............................................)
> Checking for library `filladapt'... Found
> Fontifying Axa.org... (regexps.............................................)
> Checking for library `filladapt'... Found
> Fontifying Axa.org... (regexps..............................................)
> Checking for library `filladapt'... Found
> +-> Requiring `outline-mode-easy-bindings' (already loaded)
> +-> Requiring `ispell' (already loaded)
> Evaluate code AFTER HAVING LOADED `flyspell'... [2 times]
> Starting new Ispell process [en_US] ...
> Checking for library `filladapt'...
> +-> Requiring `filladapt' (already loaded)
> Checking for library `filladapt'... Found

It seems that filladapt is causing some of the verbosity (and possible
slowness) there. When loading agenda files, my *Messages* buffer only
shows:

OVERVIEW [29 times]

> 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.

I imagine the fontification is necessary for the agenda to function
properly. Thus, org files are parsed en masse when the agenda is called
for the first time. (Hence my question about whether you were calling
the agenda from ~/.emacs.)

>
> - 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...
>

This already exists. See org-agenda-text-search-extra-files. 

Best,
Matt

  reply	other threads:[~2010-09-28 20:20 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 [this message]
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
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=878w2ld3jb.fsf@fastmail.fm \
    --to=mdl@imapmail.org \
    --cc=public-emacs-orgmode-mXXj517/zsQ@plane.gmane.org \
    --cc=public-wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@plane.gmane.org \
    /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).