[-- Attachment #1: Type: text/plain, Size: 3390 bytes --] 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 "\\<Sean Markan\\>" 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 ) [-- Attachment #2: Type: text/html, Size: 4038 bytes --]
Hello, Sean Markan <sean.markan@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
[-- Attachment #1: Type: text/plain, Size: 867 bytes --] > > > > 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 see, thanks! I will insert some section breaks in my file. - Sean [-- Attachment #2: Type: text/html, Size: 1206 bytes --]