From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: fill-paragraph running slowly in org mode Date: Wed, 16 Jul 2014 15:34:31 +0200 Message-ID: <87egxljul4.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40416) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7PLM-0001Fs-10 for emacs-orgmode@gnu.org; Wed, 16 Jul 2014 09:34:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X7PLB-0002si-TH for emacs-orgmode@gnu.org; Wed, 16 Jul 2014 09:33:59 -0400 Received: from relay5-d.mail.gandi.net ([2001:4b98:c:538::197]:49604) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7PLB-0002sP-NA for emacs-orgmode@gnu.org; Wed, 16 Jul 2014 09:33:49 -0400 In-Reply-To: (Sean Markan's message of "Sat, 12 Jul 2014 14:18:33 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Sean Markan Cc: emacs-orgmode@gnu.org Hello, Sean Markan 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