From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sean Markan Subject: fill-paragraph running slowly in org mode Date: Sat, 12 Jul 2014 14:18:33 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d0442828458e83f04fe031821 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55350) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X61tF-0003sk-29 for emacs-orgmode@gnu.org; Sat, 12 Jul 2014 14:19:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X61tD-00044u-HO for emacs-orgmode@gnu.org; Sat, 12 Jul 2014 14:19:17 -0400 Received: from mail-wi0-x230.google.com ([2a00:1450:400c:c05::230]:54309) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X61tD-00044Y-7a for emacs-orgmode@gnu.org; Sat, 12 Jul 2014 14:19:15 -0400 Received: by mail-wi0-f176.google.com with SMTP id bs8so738269wib.15 for ; Sat, 12 Jul 2014 11:19:13 -0700 (PDT) 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: emacs-orgmode@gnu.org --f46d0442828458e83f04fe031821 Content-Type: text/plain; charset=UTF-8 Hi all, 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. 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. When switching to text-mode the problem goes away. I have also tried running emacs with no customizations, and the problem is still present in that case. Things used to work fine in the versions of emacs and org-mode that I was previously using, but those were a few years old and I am not sure exactly which versions they were. I am not using linum (I've seen that mentioned as a cause of slowness). Output from org-submit-bug-report is below. Any help would be appreciated! - Sean Emacs : GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 3.10.7) of 2014-03-07 on toyol, modified by Debian Package: Org-mode version 8.2.7b (8.2.7b-dist @ /home/markan/software/org-8.2.7b/lisp/) current state: ============== (setq org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe) org-agenda-todo-ignore-scheduled t org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-hide-inline-tasks org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-babel-pre-tangle-hook '(save-buffer) org-occur-hook '(org-first-headline-recenter) org-metaup-hook '(org-babel-load-in-session-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-format-latex-options '(:foreground default :background default :scale 1.8 :html-foreground "Black" :html-background "Transparent" :html-scale 1.0 :matchers ("begin" "$1" "$" "$$" "\\(" "\\[")) org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-mode-hook '((lambda nil (org-add-hook (quote change-major-mode-hook) (quote org-show-block-all) (quote append) (quote local))) (lambda nil (org-add-hook (quote change-major-mode-hook) (quote org-babel-show-result-all) (quote append) (quote local))) org-babel-result-hide-spec org-babel-hide-all-hashes) org-link-frame-setup '((vm . vm-visit-folder-other-frame) (gnus . gnus-other-frame) (file . find-file)) org-from-is-user-regexp "\\" org-metadown-hook '(org-babel-pop-to-session-maybe) org-startup-folded 'all org-agenda-files [REDACTED]) org-file-apps '((auto-mode . emacs) ("\\.x?html?\\'" . default) ("\\.pdf\\'" . default)) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-after-todo-state-change-hook '(org-clock-out-if-current) org-confirm-shell-link-function 'yes-or-no-p ) --f46d0442828458e83f04fe031821 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi all,

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

I have tried (setq=C2=A0 fill-paragraph-function nil) in an effort to u= se emacs' default fill function instead of org mode's, but that did= not fix the problem.=C2=A0 When switching to text-mode the problem goes aw= ay.=C2=A0 I have also tried running emacs with no customizations, and the p= roblem is still present in that case.

Things used to work fine in the versions of emacs and org-mode that I w= as previously using, but those were a few years old and I am not sure exact= ly which versions they were.=C2=A0 I am not using linum (I've seen that= mentioned as a cause of slowness).=C2=A0 Output from org-submit-bug-report= is below.

Any help would be appreciated!

- Sean




Emacs=C2=A0 : GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Versio= n 3.10.7)
=C2=A0of 2014-03-07 on toyol, modified by Debian
Package: O= rg-mode version 8.2.7b (8.2.7b-dist @ /home/markan/software/org-8.2.7b/lisp= /)

current state:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(setq=C2=A0org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-exec= ute-safely-maybe)
=C2=A0org-agenda-todo-ignore-scheduled t
=C2=A0org-= tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command= -maybe org-babel-hide-result-toggle-maybe
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 org-babel-header-arg-ex= pand)
=C2=A0org-cycle-hook '(org-cycle-hide-archived-subtrees org-cy= cle-hide-drawers org-cycle-hide-inline-tasks org-cycle-show-empty-lines
= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 org-optimize-window-after-visibility-change) =C2=A0org-agenda-before-write-hook '(org-agenda-add-entry-text)
=C2= =A0org-speed-command-hook '(org-speed-command-default-hook org-babel-sp= eed-command-hook)
=C2=A0org-babel-pre-tangle-hook '(save-buffer)
= =C2=A0org-occur-hook '(org-first-headline-recenter)
=C2=A0org-metaup-hook '(org-babel-load-in-session-maybe)
=C2=A0org-c= onfirm-elisp-link-function 'yes-or-no-p
=C2=A0org-format-latex-optio= ns '(:foreground default :background default :scale 1.8 :html-foregroun= d "Black" :html-background
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 "Transparent" :html-scale 1.0 :matchers ("begin= " "$1" "$" "$$" "\\(" "\\= ["))
=C2=A0org-clock-out-hook '(org-clock-remove-empty-clock-dr= awer)
=C2=A0org-mode-hook '((lambda nil
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (org-= add-hook (quote change-major-mode-hook) (quote org-show-block-all) (quote a= ppend) (quote local)))
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (lambda nil
=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 (org-add-hook (quote change-major-mode-hook) (quote org-= babel-show-result-all) (quote append) (quote local)))
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 org-babel-result-hide-spec org-babel-hide-all-hashes)=
=C2=A0org-link-frame-setup '((vm . vm-visit-folder-other-frame) (gn= us . gnus-other-frame) (file . find-file))
=C2=A0org-from-is-user-regexp= "\\<Sean Markan\\>"
=C2=A0org-metadown-hook '(org-babel-pop-to-session-maybe)
=C2=A0org-= startup-folded 'all
=C2=A0org-agenda-files [REDACTED])
=C2=A0org-= file-apps '((auto-mode . emacs) ("\\.x?html?\\'" . defaul= t) ("\\.pdf\\'" . default))
=C2=A0org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-m= ode-configure-edit-buffer)
=C2=A0org-after-todo-state-change-hook '(= org-clock-out-if-current)
=C2=A0org-confirm-shell-link-function 'yes= -or-no-p
=C2=A0)

--f46d0442828458e83f04fe031821--