emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: Having (too) many files in org-agenda-files


From: Sébastien Vauban
Subject: [Orgmode] Re: Having (too) many files in org-agenda-files
Date: Wed, 01 Dec 2010 20:46:09 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (windows-nt)

Hi Carsten and Nick,

Carsten Dominik wrote:
> On Sep 30, 2010, at 7:08 PM, Sébastien Vauban wrote:
>> Nick Dokos wrote:
>>> Sébastien Vauban <address@hidden> wrote:
>>>>>> Having to wait 92 seconds at startup, or a long time just a few minutes
>>>>>> later has the same impact for me.
>>>
>>> Maybe you should try adding a call to the profiler to your .emacs and try
>>> to measure e.g. how much the font locking costs. Off the top of my head
>>> and entirely untested, adding (require 'elp) might be enough.
>>
>> Here are the results.
>>
>> font-lock-fontify-buffer               96   15.383627999  0.1602461249
>
> Well, the point I am trying to make already for a number of messages is
> this: font-lock-fontify-buffer should not be called at all - it is not
> called in my setup.
>
> But, apparently, fontlock is bad, but not the worst issue you are
> encountering.
>
>> font-lock-default-fontify-buffer       96   15.378296000  0.1601905833
>> font-lock-fontify-region               96   15.284044000  0.1592087916
>> font-lock-default-fontify-region       96   15.282674000  0.1591945208
>> font-lock-fontify-keywords-region      96   15.184516     0.1581720416
>> font-lock-prepend-text-property        8608   0.2712220000  3.150...e-05
>> font-lock-unfontify-region             96   0.0859729999  0.0008955520
>> font-lock-add-keywords                 166   0.0800819999  0.0004824216
>> font-lock-compile-keywords             138   0.0671930000  0.0004869057
>> font-lock-default-unfontify-region     96   0.0378660000  0.0003944375
>> font-lock-mode                         142   0.0344680000  0.0002427323

For whatever reason, I've noticed that there are:

- 96 calls for 32 files in my org-agenda-files
- 99 calls for 33 files in my org-agenda-files

hence, 3 font-lock-fontify-buffer calls per Org file[1].

Anyway, I now do have found the culprit: the =column-marker= package (which
highlights my columns 78, 79 and 80 of text), loaded in my .emacs file by this
snippet):

#+begin_src emacs-lisp
  ;; highlight columns 78 to 80 in some modes
  (when (require 'column-marker)

    (dolist (hook '(emacs-lisp-mode-hook
                    cperl-mode-hook
                    shell-mode-hook
                    text-mode-hook
                    change-log-mode-hook
                    makefile-mode-hook
                    message-mode-hook
                    texinfo-mode-hook))
      (add-hook hook (lambda ()
                       (interactive)
                       (column-marker-1 78)
                       (column-marker-2 79)
                       (column-marker-3 80)))))
#+end_src

It accounts for a bit more than 10 s delay in the total time of my .emacs file
-- which, currently, still calls (org-agenda-list):

- with it, total time is 70s - 73s
- without it, total time is 80s - 84s

The difference is really huge...

Though, such a capability being really nice, do you know some replacement for
this?

Best regards,
  Seb

Footnotes:
[1] The offending package highlights 3 columns in the buffer: maybe that's the
    factor 3 for every Org file...

-- 
Sébastien Vauban




reply via email to

[Prev in Thread] Current Thread [Next in Thread]