From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Ecay Subject: Re: footnote fontify causing massive slowdown Date: Sat, 05 Dec 2015 13:47:33 +0000 Message-ID: <87h9jx2eiy.fsf@gmail.com> References: <87egf1qcgn.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5DBb-00081R-B8 for emacs-orgmode@gnu.org; Sat, 05 Dec 2015 08:47:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a5DBY-0008Ov-4E for emacs-orgmode@gnu.org; Sat, 05 Dec 2015 08:47:39 -0500 Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]:33571) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5DBX-0008O6-Tl for emacs-orgmode@gnu.org; Sat, 05 Dec 2015 08:47:36 -0500 Received: by wmec201 with SMTP id c201so109867513wme.0 for ; Sat, 05 Dec 2015 05:47:35 -0800 (PST) In-Reply-To: <87egf1qcgn.fsf@nicolasgoaziou.fr> 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: Nicolas Goaziou , Derek Feichtinger Cc: emacs-orgmode@gnu.org Hi Nicolas, 2015ko abenudak 5an, Nicolas Goaziou-ek idatzi zuen: >=20 > This is a limitation of our current way to fontify a buffer. Changing it > implies some serious work, which I'd rather spend on switching to > syntax-based (instead of regexp-based) fontification. Indeed. However, this code was needlessly slow because it failed to take advantage of short-circuit evaluation. I pushed a fix in 046310d. >=20 > However, this report raises an interesting question about footnotes: > should we still support plain (e.g., "[1]") footnotes in Org documents? >=20 > The pattern is very common an regularly introduces false positives. > Also, IIRC, it was introduced for non-Org buffers (e.g., in Message mode > buffers), to provide some common features with "footnote.el" library. >=20 > I think we could remove this kind of footnotes, and yet preserve > `org-footnote-normalize' to change Org footnotes into these ones, for > foreign documents. >=20 > WDYT? Do [1]-type footnotes present other performance problems today? I=E2=80=99d rather see if simple solutions to those can be effective before going for a breaking change to syntax. Then there=E2=80=99s the fact that syntax fontification (incl. org-elements cache) is going to have such different performance characteristics I=E2=80=99m not sure we can predict where the bottlenecks will be. --=20 Aaron Ecay