From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: org-src-fontify-natively makes things very, very slow Date: Tue, 29 Mar 2011 10:49:45 -0400 Message-ID: <87sju6nfqu.fsf@fastmail.fm> References: <87ipvhiou8.fsf@ucl.ac.uk> <804o71triy.fsf@somewhere.org> <87bp18su1a.fsf@ucl.ac.uk> <80fwqjqxfj.fsf@somewhere.org> <87oc56q26l.fsf@ucl.ac.uk> <87ipvdo9zs.fsf@ucl.ac.uk> <87tyewk1im.fsf@gmail.com> <87lj089ze7.fsf@pinto.chemeng.ucl.ac.uk> <80wrjsun8p.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=60297 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4aEw-0005Ja-GT for emacs-orgmode@gnu.org; Tue, 29 Mar 2011 10:49:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q4aEt-0005Tc-QP for emacs-orgmode@gnu.org; Tue, 29 Mar 2011 10:49:49 -0400 Received: from out3.smtp.messagingengine.com ([66.111.4.27]:59985) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q4aEt-0005TP-Hc for emacs-orgmode@gnu.org; Tue, 29 Mar 2011 10:49:47 -0400 In-Reply-To: <80wrjsun8p.fsf@somewhere.org> (=?utf-8?Q?=22S=C3=A9bastien?= Vauban"'s message of "Mon, 21 Mar 2011 23:23:18 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?utf-8?Q?S=C3=A9bastien?= Vauban Cc: Org Mode S=C3=A9bastien Vauban writes: >>> Maybe this is (partly?) due to the overlay I added: >>> >>> #+begin_src emacs-lisp >>> (overlay-put (make-overlay beg1 block-end) >>> 'face 'org-block-background)) >>> #+end_src > > See http://patchwork.newartisans.com/patch/581/ for a full diff. You can = see I > only add *one* overlay: for the background face. > >> (well, commenting out the whole condition that includes this code) makes= no >> difference at all. > > I'm surprised. Good to hear, but as some were finger pointing the overlay= s, > and as I added one for every block... But, OK, better like that! > > For the sake of completeness, know that I first tried to add the backgrou= nd > fontification as a text property, but that made the other properties disa= ppear > (annihilating the native fontification in fact). No a solution, or I did = not > try the right way -- which is entirely possible, seen my poor knowledge on > this subject (I have to admit I succeeded by trials and errors). I believe there is a bug here. I'm not sure if it is related to the performance issues, but when org-src-fontify-natively is t, new overlays keep getting added to the source block with each keypress in the source block. For instance, just typing this line of perl... #+begin_src perl my @apples =3D ("golden delicious", "braeburn"); #+end_src ...resulted in 54 identical overlays being added to the buffer. ,----[ M-x describe-text-properties | There are 54 overlays here: | From 39 to 88 | face org-block-background | From 39 to 88 | face org-block-background | From 39 to 88 | face org-block-background | From 39 to 88 | face org-block-background | ....[and so on] `---- The number keeps growing with more typing, since make-overlay is called without a test to see if an overlay already exists.=20 Best, Matt=20