Hello,

Sean Markan <sean.mar...@gmail.com> writes:

> I just upgraded to a new version of Linux/emacs/org-mode, and am finding
> that fill-paragraph (M-q) runs very slowly in org-mode on large files.
> With about 50k lines in the buffer, fill-paragraph takes around 3 seconds
> even if the paragraph is only a couple lines.  (The behavior is correct,
> the problem is just the slowness.)  The time seems to scale linearly with
> the number of lines in the buffer as if the whole file is being processed
> during each fill-paragraph.

Actually, the full section is processed. It can be slow on very large
sections, indeed. Though, you could use a profiler (M-x profiler-start)
to check if something is suspicious.

Note that Org 8.3+ makes it a lot better with a cache mechanism, but it
is still buggy at the moment.

> I have tried (setq  fill-paragraph-function nil) in an effort to use emacs'
> default fill function instead of org mode's, but that did not fix the
> problem.

You could set it locally, in a hook (e.g., `org-mode-hook').


Regards,

-- 
Nicolas Goaziou

Reply via email to