emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Huge performance problems to open some Org files


From: Sebastien Vauban
Subject: Re: [O] Huge performance problems to open some Org files
Date: Wed, 18 May 2011 22:09:57 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (windows-nt)

Hi Eric, Carsten and al.,

Carsten Dominik wrote:
> On May 13, 2011, at 12:27 AM, Sebastien Vauban wrote:
>> Vladimir Alexiev wrote: This has gotten worse. But, now, I have some proofs
>> about what I experience: opening the attached Org file (2 KB) consumes me
>> 191 seconds, yes 191 seconds, even when done after the agenda view has been
>> launched -- I mean, all agenda files and all Org files have been read..
>
> I would think the only way to sort this out is the following:
>
> 1. Try loading the file with emacs -Q
> 2. Try loading it with
>
>     emacs -Q -l minimal.emacs
>
>    where the minimal.emacs d does nothing but
>    make sure that the latest Org is being loaded.
>
> I expect that loading your file under these test will be very fast.
>
> Then bisect your entire Emacs setup to find which part of your setup is
> causing this issue. I know you have *a lot* of setup, but I don't see any
> other route.

Found it!  Dunno understand the root cause yet, though.

After suspecting non-Org related stuff in my -- yes, Carsten -- huge .emacs
file, I found the problem to be here:

#+begin_src emacs-lisp
        (add-hook 'org-mode-hook
                  (lambda ()
                    ;; ;; display images in your Org files
                    ;; (turn-on-iimage-mode)
                    ;; PERFORMANCE PROBLEM with some Org files!!!

                    (local-set-key "\M-n" 'outline-next-visible-heading)
                    (local-set-key "\M-p" 'outline-previous-visible-heading)

                    ;; table
                    (local-set-key "\M-\C-w" 'org-table-copy-region)
                    (local-set-key "\M-\C-y" 'org-table-paste-rectangle)
                    (local-set-key "\M-\C-l" 'org-table-sort-lines)

                    ;; file modification date
                    (set (make-local-variable 'time-stamp-format) 
"%:y-%02m-%02d")
                    (set (make-local-variable 'time-stamp-start) "^#\\+DATE: +")
                    (set (make-local-variable 'time-stamp-end) "$")

                    ;; flyspell mode to spell check everywhere
                    (when (executable-find ispell-program-name)
                      ;; check if `ispell-program-name' seems correct
                      (flyspell-mode 1))
                    ))
#+end_src

Turning on the line iimage-mode makes opening of *some* Org files go from 0.2
seconds to 193 seconds!

The times are very stable on both sides.

Dunno yet why this happen (I have the impression only on _my_ Windows, not
when I was on Ubuntu), but this will be for some later day...

Best regards,
  Seb

-- 
Sébastien Vauban




reply via email to

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