From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?S=C3=A9bastien_Vauban?= Subject: Re: org-src-fontify-natively makes things very, very slow Date: Wed, 30 Mar 2011 09:34:11 +0200 Message-ID: <807hbhkqoc.fsf@somewhere.org> 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> <87sju6nfqu.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: 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-mXXj517/zsQ@public.gmane.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Matt, Matt Lundin wrote: > 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 > > 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] > `---- I believe as well there is a problem! > The number keeps growing with more typing, since make-overlay is called > without a test to see if an overlay already exists. Thanks (a lot) for your very enlightening analysis. I will try to get this fixed in a couple of days. Best regards, Seb --=20 S=C3=A9bastien Vauban