emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* footnote fontify causing massive slowdown
@ 2015-12-04  7:15 Derek Feichtinger
  2015-12-05 12:58 ` Nicolas Goaziou
  0 siblings, 1 reply; 14+ messages in thread
From: Derek Feichtinger @ 2015-12-04  7:15 UTC (permalink / raw)
  To: emacs-orgmode

While diagnosing a server condition, I was listing parts of a system log
via a babel expression. The 130 lines in the babel output are wrapped in
an example block. This block caused massive slowdown of scrolling and
other operations.

Using the emacs profiler I see:

- redisplay_internal (C function) 8232  88%
 - jit-lock-function 8226  88%
  - jit-lock-fontify-now 8226  88%
   - funcall 8226  88%
    - #<compiled 0x1cc274f>                                      8226  88%
     - run-hook-with-args 8226  88%
      - font-lock-fontify-region 8226  88%
       - font-lock-default-fontify-region 8226  88%
        - font-lock-fontify-keywords-region 8226  88%
         - org-activate-footnote-links 8158  87%
          - org-footnote-next-reference-or-definition 8158  87%
           - byte-code 8158  87%
            - org-footnote-at-reference-p 4114  44%
             - org-footnote-in-valid-context-p 4106  44%
              + org-inside-LaTeX-fragment-p 2380  25%
              + org-in-block-p 1563  16%
              + org-in-verbatim-emphasis 159   1%
                org-at-comment-p 4   0%

Checking for footnote pattern matches (org-footnote-re) in the wrapped
block, I see that
every line matches based on the very simple and trivial pattern of
number enclosed in angular brackets, so all the process numbers
following the "sshd" in these lines like "sshd[1234]" do match and cause load.

#################
    /var/log/secure-20151129:Nov 23 02:25:36 some-host sshd[20089]: Rhosts
authentication refused for userXYZ: bad ownership or modes for home directory.
    /var/log/secure-20151129:Nov 23 02:25:36 some-host sshd[20089]: Rhosts
authentication refused for userXYZ: bad ownership or modes for home directory.
    /var/log/secure-20151129:Nov 23 02:25:41 some-host sshd[20089]:
pam_ldap: error trying to bind as user "xxxxx" (Invalid credentials)
#################

Since this kind of pattern is so common in logs and 130 lines are really not
a large number, it makes it hard to use
org for this purpose. Can this be turned off selectively, or can it be
prevented in example blocks?

Using [8.3.2 (8.3.2-37-gd45217-elpaplus @
/home/dfeich/.emacs.d/elpa/org-plus-contrib-20151116/)] with GNU Emacs 24.5.1.

Best regards,
Derek

^ permalink raw reply	[flat|nested] 14+ messages in thread
* footnote fontify causing massive slowdown
@ 2015-12-03  7:17 Derek Feichtinger
  0 siblings, 0 replies; 14+ messages in thread
From: Derek Feichtinger @ 2015-12-03  7:17 UTC (permalink / raw)
  To: emacs-orgmode

While diagnosing a server condition, I was listing parts of a system log
via a babel expression. The 130 lines in the babel output are wrapped in
an example block. This block caused massive slowdown of scrolling and
other operations.

Using the emacs profiler I see:

- redisplay_internal (C function) 8232  88%
  - jit-lock-function 8226  88%
   - jit-lock-fontify-now 8226  88%
    - funcall 8226  88%
     - #<compiled 0x1cc274f>                                      8226  88%
      - run-hook-with-args 8226  88%
       - font-lock-fontify-region 8226  88%
        - font-lock-default-fontify-region 8226  88%
         - font-lock-fontify-keywords-region 8226  88%
          - org-activate-footnote-links 8158  87%
           - org-footnote-next-reference-or-definition 8158  87%
            - byte-code 8158  87%
             - org-footnote-at-reference-p 4114  44%
              - org-footnote-in-valid-context-p 4106  44%
               + org-inside-LaTeX-fragment-p 2380  25%
               + org-in-block-p 1563  16%
               + org-in-verbatim-emphasis 159   1%
                 org-at-comment-p 4   0%

Checking for footnote pattern matches (org-footnote-re) in the wrapped 
block, I see that
every line matches based on the very simple and trivial pattern of
number enclosed in angular brackets, so all the process numbers
following the "sshd" in these lines like "sshd[1234]" do match and cause 
load.

#################
     /var/log/secure-20151129:Nov 23 02:25:36 some-host sshd[20089]: 
Rhosts authentication refused for userXYZ: bad ownership or modes for 
home directory.
     /var/log/secure-20151129:Nov 23 02:25:36 some-host sshd[20089]: 
Rhosts authentication refused for userXYZ: bad ownership or modes for 
home directory.
     /var/log/secure-20151129:Nov 23 02:25:41 some-host sshd[20089]: 
pam_ldap: error trying to bind as user "xxxxx" (Invalid credentials)
#################

Since this kind of pattern is so common in logs and 130 lines are really 
not a large number, it makes it hard to use
org for this purpose. Can this be turned off selectively, or can it be
prevented in example blocks?

Using [8.3.2 (8.3.2-37-gd45217-elpaplus @ 
/home/dfeich/.emacs.d/elpa/org-plus-contrib-20151116/)] with GNU Emacs 
24.5.1.

Best regards,
Derek




-- 
Paul Scherrer Institut
Dr. Derek Feichtinger                   Phone:   +41 56 310 47 33
Section Head Scientific Computing       Email: derek.feichtinger@psi.ch
Building/Room No. WHGA/U126
CH-5232 Villigen PSI

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-12-06  9:40 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-04  7:15 footnote fontify causing massive slowdown Derek Feichtinger
2015-12-05 12:58 ` Nicolas Goaziou
2015-12-05 13:47   ` Aaron Ecay
2015-12-05 15:35     ` Nicolas Goaziou
2015-12-05 15:55       ` Aaron Ecay
2015-12-06  9:41         ` Nicolas Goaziou
2015-12-05 21:40   ` Alan L Tyree
2015-12-05 21:45     ` Matt Lundin
2015-12-05 23:42   ` Rasmus
2015-12-06  0:16   ` Samuel Wales
2015-12-06  0:58   ` William Denton
2015-12-06  1:18     ` Thomas S. Dye
2015-12-06  9:42       ` Nicolas Goaziou
  -- strict thread matches above, loose matches on Subject: below --
2015-12-03  7:17 Derek Feichtinger

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).