From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: How can I predict which regions xdisp will present me for font-locking? Date: Mon, 12 Mar 2012 20:00:06 +0200 Message-ID: <834nttya1l.fsf@gnu.org> References: <20120311205903.GA3717@acm.acm> <83d38iyfox.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: dough.gmane.org 1331575219 28968 80.91.229.3 (12 Mar 2012 18:00:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 12 Mar 2012 18:00:19 +0000 (UTC) Cc: acm@muc.de, emacs-devel@gnu.org To: John Yates Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 12 19:00:16 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1S79XW-00018e-By for ged-emacs-devel@m.gmane.org; Mon, 12 Mar 2012 19:00:10 +0100 Original-Received: from localhost ([::1]:35323 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S79XV-0006t9-SY for ged-emacs-devel@m.gmane.org; Mon, 12 Mar 2012 14:00:09 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S79XS-0006px-7H for emacs-devel@gnu.org; Mon, 12 Mar 2012 14:00:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S79XL-0004fn-Ms for emacs-devel@gnu.org; Mon, 12 Mar 2012 14:00:05 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:64683) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S79XL-0004fX-EY for emacs-devel@gnu.org; Mon, 12 Mar 2012 13:59:59 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0M0S006009YOO600@a-mtaout21.012.net.il> for emacs-devel@gnu.org; Mon, 12 Mar 2012 19:59:57 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.124.179.236]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M0S006QI9ZWHIB0@a-mtaout21.012.net.il>; Mon, 12 Mar 2012 19:59:57 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:148980 Archived-At: > Date: Mon, 12 Mar 2012 13:47:00 -0400 > From: John Yates > Cc: Alan Mackenzie , emacs-devel@gnu.org >=20 > > =A0. every change in the buffer triggers a call to > > =A0 =A0font-lock-extend-jit-lock-region-after-change (via > > =A0 =A0jit-lock-after-change-extend-region-functions) > > > > =A0. font-lock-extend-jit-lock-region-after-change extends the re= gion > > =A0 =A0of the change according to the font-lock properties of the= major > > =A0 =A0mode, then marks that region unfontified by putting on it = a > > =A0 =A0`fontified' text property with the value nil > > > > =A0. the next redisplay cycle calls jit-lock-function (via > > =A0 =A0fontification-functions) at the beginning of the region wh= ose > > =A0 =A0`fontified' property is nil, and refontifies the region fr= om there > > =A0 =A0in chunks of 500 characters (but every chunk is extended s= o that > > =A0 =A0its start is at the beginning of a line and its end is at = the end > > =A0 =A0of a line) > > > > Does this explain what you see? >=20 > How does this strategy differ from 23.x? It doesn't, not in the display engine. > I am seeing a horrendous slowdown when editing atypical macros (tho= ugh > no more than 50 lines long). Can you give more quantitative description of the slowdown? E.g., ho= w much time does it take to move the cursor by one character or one line, or to insert or delete a single character? If you replace cc-mode Lisp files in v24 with those in v23, does the problem go away?