From mboxrd@z Thu Jan 1 00:00:00 1970 From: Derek Feichtinger Subject: footnote fontify causing massive slowdown Date: Fri, 4 Dec 2015 07:15:20 +0000 (UTC) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39082) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4kag-0005wZ-Rj for emacs-orgmode@gnu.org; Fri, 04 Dec 2015 02:15:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a4kac-0007JH-K2 for emacs-orgmode@gnu.org; Fri, 04 Dec 2015 02:15:38 -0500 Received: from plane.gmane.org ([80.91.229.3]:34082) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4kac-0007JB-6W for emacs-orgmode@gnu.org; Fri, 04 Dec 2015 02:15:34 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1a4kaZ-00015P-Jv for emacs-orgmode@gnu.org; Fri, 04 Dec 2015 08:15:31 +0100 Received: from 18.20.60.188.dynamic.wline.res.cust.swisscom.ch ([188.60.20.18]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 04 Dec 2015 08:15:31 +0100 Received: from derek.feichtinger by 18.20.60.188.dynamic.wline.res.cust.swisscom.ch with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 04 Dec 2015 08:15:31 +0100 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 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% - # 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