From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#14886: Fwd: bug#14886: Fwd: A significant slowdown calling font-lock-fontify-buffer from a hook Date: Sat, 27 Jul 2013 09:35:56 +0000 Message-ID: <20130727093556.GA3616@acm.acm> References: <51E69331.9070007@cs.ucla.edu> <20130724193039.GA11879@acm.acm> <20130726194428.GA3974@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1374917827 1499 80.91.229.3 (27 Jul 2013 09:37:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 27 Jul 2013 09:37:07 +0000 (UTC) Cc: Paul Eggert , 14886@debbugs.gnu.org To: Juanma Barranquero Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 27 11:37:08 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1V30vz-0005Hn-SZ for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Jul 2013 11:37:07 +0200 Original-Received: from localhost ([::1]:40184 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V30vz-0007lO-HS for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Jul 2013 05:37:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35038) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V30vw-0007lH-5M for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2013 05:37:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V30vv-0002pB-6R for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2013 05:37:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58035) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V30vv-0002p7-32 for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2013 05:37:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1V30vu-0000Sd-In for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2013 05:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Jul 2013 09:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14886 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14886-submit@debbugs.gnu.org id=B14886.13749178191753 (code B ref 14886); Sat, 27 Jul 2013 09:37:02 +0000 Original-Received: (at 14886) by debbugs.gnu.org; 27 Jul 2013 09:36:59 +0000 Original-Received: from localhost ([127.0.0.1]:52351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V30vq-0000SC-Mo for submit@debbugs.gnu.org; Sat, 27 Jul 2013 05:36:59 -0400 Original-Received: from pd951a904.dip0.t-ipconnect.de ([217.81.169.4]:59765 helo=acm.muc.de) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V30vm-0000Rz-Kq for 14886@debbugs.gnu.org; Sat, 27 Jul 2013 05:36:56 -0400 Original-Received: (qmail 3714 invoked by uid 1000); 27 Jul 2013 09:35:56 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:76699 Archived-At: Hi, Juanma. On Fri, Jul 26, 2013 at 11:32:03PM +0200, Juanma Barranquero wrote: > On Fri, Jul 26, 2013 at 9:44 PM, Alan Mackenzie wrote: > > In the trunk, the entire buffer seems to get fontified, taking ~28s on my > > machine. I think the definition of `font-lock-fontify-buffer' has > > changed. Could this change explain the difference in timings you see? > Yes, I suppose so. > > I'm not sure I'm getting very far, here. IIUC, the problem is that the > > initial f-l-fontify-buffer is taking around 72s in some circumstances, as > > opposed to 18s (on JB's machine). I can't reproduce the problem. > Sorry, I don't understand. The bug is not that it takes 18s or 72s, is > that it goes from less than two seconds (in 24.3) to tens of seconds > (in trunk). Do you see that problem or don't you? I see the phenomenon, yes, but I'm not sure it counts as a problem. To completely fontify the xdisp.c buffer takes 28s, or perhaps 18s on a very fast machine. xdisp.c is ~30,000 lines. It does not take two seconds to fontify on any ordinary hardware. On Emacs 24.3, I'm convinced that a full fontification is _not_ taking place - merely the fontification by jit-lock of the visible window. On the trunk the full fontification is getting done. I've tried a brief ediff between the font-lock files in 24.3 and trunk, but haven't spotted the difference yet in font-lock-fontify-buffer which I suspect is there. Stefan? > Juanma -- Alan Mackenzie (Nuremberg, Germany).