Ok - I tried adding (setq font-lock-verbose nil), but there was no change. It is still fast when I open emacs, and then some time later (after I switch to another program for some time and back) it is slow. Sometimes it will become fast again, and sometimes I recall (I think) it has been slow right when I open it.
There have been various discussions on agenda slowness in the past -Susan Addy <susan.e.addy@gmail.com> wrote:
> Thanks Bernt. I checked and Linum-mode is not enabled.
>
> Also, I using emacs 22.3.1 and org-mode 7.7 (if it helps).
>
>
> On Sun, Nov 13, 2011 at 2:16 PM, Bernt Hansen <bernt@norang.ca> wrote:
>
> Susan Addy <susan.e.addy@gmail.com> writes:
>
> > Below is a list of my agenda command - maybe it is too long? When it
> > is slow, it is slow no matter what TODO I am trying to compile.
> >
> > Any thoughts?
> > Thank you!
>
> If you have linum-mode enabled you should turn that off. Others have
> reported slow navigation when that is enabled.
>
> HTH,
> Bernt
>
>
check the mailing list for some guesses (linum-mode, font-lock, property
inheritance, code compilation and perhaps others have been suggested as
possible causes). Sometimes the guesses pan out, sometimes not.
The most important thing you can do, imo, is to profile the code, first
when it's behaving well and then when it's behaving badly.
All you have to do is
M-x elp-instrument-package RET org RET
run your agenda command and then
M-x elp-results RET
to get the results.
Nick