emacs-orgmode
[Top][All Lists]
Advanced

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

[O] Re: org-src-fontify-natively makes things very, very slow


From: Sébastien Vauban
Subject: [O] Re: org-src-fontify-natively makes things very, very slow
Date: Mon, 21 Mar 2011 23:23:18 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (windows-nt)

Hi Eric,

Eric S Fraga wrote:
> going back to the original subject of this thread (although thanks all for
> your inputs on yasnippet ;-), I have started working on a new document and
> am finding the slowdown of navigation (next-line) very annoying. In this
> document, I have two gnuplot source blocks. Navigating through them, I get
> the following results from elp:
>
> next-line                                                     54          
> 5.9466770000  0.1101236481
> previous-line                                                 44          
> 0.4350030000  0.0098864318
> org-encrypt-entries                                           1           
> 0.000424      0.000424
> org-scan-tags                                                 1           
> 0.000368      0.000368
> org-make-tags-matcher                                         1           
> 5.1e-05       5.1e-05
> org-activate-plain-links                                      1           
> 2.4e-05       2.4e-05
> org-raise-scripts                                             1           
> 2.1e-05       2.1e-05
> org-fontify-meta-lines-and-blocks                             1           
> 1.9e-05       1.9e-05
> org-font-lock-hook                                            1           
> 1.9e-05       1.9e-05
> org-outline-level                                             5           
> 1.9e-05       3.8e-06
> org-mode-flyspell-verify                                      14          
> 1.8e-05       1.285...e-06
> org-inlinetask-fontify                                        1           
> 1.5e-05       1.5e-05
> org-activate-footnote-links                                   1           
> 1.5e-05       1.5e-05
> org-unfontify-region                                          1           
> 1.2e-05       1.2e-05
> org-do-emphasis-faces                                         1           
> 1.2e-05       1.2e-05
> org-activate-angle-links                                      1           
> 1.2e-05       1.2e-05
> org-activate-dates                                            1           
> 1.1e-05       1.1e-05
> org-fontify-entities                                          1           
> 1.1e-05       1.1e-05
>
> From these timings, the font locking doesn't seem to be the issue but maybe
> the overlays are. However, commenting out the code that Sébastien Vauban
> indicated:
>
>> Maybe this is (partly?) due to the overlay I added:
>>
>> #+begin_src emacs-lisp
>>                 (overlay-put (make-overlay beg1 block-end)
>>                              'face 'org-block-background))
>> #+end_src

See http://patchwork.newartisans.com/patch/581/ for a full diff. You can see I
only add *one* overlay: for the background face.

> (well, commenting out the whole condition that includes this code) makes no
> difference at all.

I'm surprised. Good to hear, but as some were finger pointing the overlays,
and as I added one for every block... But, OK, better like that!

For the sake of completeness, know that I first tried to add the background
fontification as a text property, but that made the other properties disappear
(annihilating the native fontification in fact). No a solution, or I did not
try the right way -- which is entirely possible, seen my poor knowledge on
this subject (I have to admit I succeeded by trials and errors).

> So, I turned off =org-src-fontify-natively= and things are back to
> normal: next-line is as fast as previous-line.  I can put up without the
> fontification so this is what I am doing now.
>
> However, as it's a pity to lose the native fontification, it would be
> nice to solve this problem in another way.  Can anybody suggest any
> other thing to try?

Not that I can think of now. Sorry for not being of any help here.

Best regards,
  Seb

-- 
Sébastien Vauban




reply via email to

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