From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#14886: Fwd: bug#14886: Fwd: A significant slowdown calling font-lock-fontify-buffer from a hook Date: Wed, 24 Jul 2013 21:24:37 -0400 Message-ID: References: <83ehay2vgw.fsf@gnu.org> <837ggp3kcb.fsf@gnu.org> <51E69331.9070007@cs.ucla.edu> <20130724193039.GA11879@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1374715509 19379 80.91.229.3 (25 Jul 2013 01:25:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 25 Jul 2013 01:25:09 +0000 (UTC) Cc: Alan Mackenzie , 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 Thu Jul 25 03:25:09 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 1V2AIm-0008Ff-SV for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Jul 2013 03:25:08 +0200 Original-Received: from localhost ([::1]:54634 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2AIm-0003sQ-2j for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Jul 2013 21:25:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51040) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2AIi-0003qC-9P for bug-gnu-emacs@gnu.org; Wed, 24 Jul 2013 21:25:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V2AIh-0000ag-EO for bug-gnu-emacs@gnu.org; Wed, 24 Jul 2013 21:25:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53695) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2AIh-0000a2-Av for bug-gnu-emacs@gnu.org; Wed, 24 Jul 2013 21:25:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1V2AIg-0005xR-Bn for bug-gnu-emacs@gnu.org; Wed, 24 Jul 2013 21:25:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Jul 2013 01:25: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.137471548622830 (code B ref 14886); Thu, 25 Jul 2013 01:25:02 +0000 Original-Received: (at 14886) by debbugs.gnu.org; 25 Jul 2013 01:24:46 +0000 Original-Received: from localhost ([127.0.0.1]:48006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V2AIQ-0005w7-7o for submit@debbugs.gnu.org; Wed, 24 Jul 2013 21:24:46 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:63185) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V2AIO-0005vD-Bb for 14886@debbugs.gnu.org; Wed, 24 Jul 2013 21:24:45 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFxLd+/2dsb2JhbABEvw4Xc4IfAQVWIxALDiYHCxQYDSSIJMEtkQoDpHqBXoMT X-IPAS-Result: Av4EABK/CFFFxLd+/2dsb2JhbABEvw4Xc4IfAQVWIxALDiYHCxQYDSSIJMEtkQoDpHqBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="19755129" Original-Received: from 69-196-183-126.dsl.teksavvy.com (HELO pastel.home) ([69.196.183.126]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 24 Jul 2013 21:24:32 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id E8A1762E5D; Wed, 24 Jul 2013 21:24:37 -0400 (EDT) In-Reply-To: (Juanma Barranquero's message of "Wed, 24 Jul 2013 23:29:00 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) 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:76638 Archived-At: > - Font-lock-fontify-buffer should not be called from a hook. Font-lock-fontify-buffer is definitely a bad function, since it has 2 different meanings (either "make sure the buffer is fontified" or "please refontify the buffer"). It should be replaced by two different functions: - font-lock-ensure-fontification, which makes sure fontification is applied to a particular region (e.g. for use by things like htmlfontify or ps-print). - font-lock-flush-fontification which indicates that the fontification for a particular region should be considered out-of-date (e.g. for use after calling font-lock-add/remove-keywords). I don't see why any of those 3 functions shouldn't be called from a hook, tho. > - Errors during fontification should be visible. That would have made > clear that there was something wrong with the 24.3 use case. Silent errors are bugs. Please try and find what happens with the error message. Stefan