From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs Subject: bug#14886: Fwd: A significant slowdown calling font-lock-fontify-buffer from a hook Date: Wed, 17 Jul 2013 01:03:32 +0200 Message-ID: References: <83ip0a2xlb.fsf@gnu.org> <83ehay2vgw.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1374015908 15658 80.91.229.3 (16 Jul 2013 23:05:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Jul 2013 23:05:08 +0000 (UTC) To: 14886@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 17 01:05: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 1UzEIu-0004LX-9W for geb-bug-gnu-emacs@m.gmane.org; Wed, 17 Jul 2013 01:05:08 +0200 Original-Received: from localhost ([::1]:47838 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzEIt-0002CT-QY for geb-bug-gnu-emacs@m.gmane.org; Tue, 16 Jul 2013 19:05:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzEIq-0002BK-6c for bug-gnu-emacs@gnu.org; Tue, 16 Jul 2013 19:05:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UzEIp-0007FE-8O for bug-gnu-emacs@gnu.org; Tue, 16 Jul 2013 19:05:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36716) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzEIp-0007ES-5B; Tue, 16 Jul 2013 19:05:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1UzEIo-0002wl-JQ; Tue, 16 Jul 2013 19:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juanma Barranquero Original-Sender: "Debbugs-submit" Resent-CC: eliz@gnu.org, bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 Jul 2013 23:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 14886 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Bug-Gnu-Emacs X-Debbugs-Original-Xcc: eliz@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.137401586511230 (code B ref -1); Tue, 16 Jul 2013 23:05:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Jul 2013 23:04:25 +0000 Original-Received: from localhost ([127.0.0.1]:59265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UzEIC-0002v4-PV for submit@debbugs.gnu.org; Tue, 16 Jul 2013 19:04:25 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48177) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UzEIA-0002uf-7L for submit@debbugs.gnu.org; Tue, 16 Jul 2013 19:04:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UzEI4-00073D-1N for submit@debbugs.gnu.org; Tue, 16 Jul 2013 19:04:16 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:47140) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzEI3-000739-UN for submit@debbugs.gnu.org; Tue, 16 Jul 2013 19:04:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49899) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzEI3-000276-2Q for bug-gnu-emacs@gnu.org; Tue, 16 Jul 2013 19:04:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UzEI2-00072v-8q for bug-gnu-emacs@gnu.org; Tue, 16 Jul 2013 19:04:14 -0400 Original-Received: from mail-ea0-x22d.google.com ([2a00:1450:4013:c01::22d]:58394) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzEI2-00072o-27 for bug-gnu-emacs@gnu.org; Tue, 16 Jul 2013 19:04:14 -0400 Original-Received: by mail-ea0-f173.google.com with SMTP id g15so681513eak.4 for ; Tue, 16 Jul 2013 16:04:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=OHQz3aZCKJsP7HXbxYYxlN6nOaDZThgwxpSfVzegWN0=; b=XP1mGrbsx5r/LOPE/b0Y3iOR9NDp9JCKFn99OJZRbaRYVoCNWPAs0sDsAAwybCbd+Q VVosfdykz4rAPzAU+fyCrKiz13Z7xJQpddlBR8D2pDbq4DUnP4081x7wUmYUhIiipi4z mCz6bi7dZcrPh4WUYpWWBscXIMe88omftfHpO52YdErybO0KtG4y+ObnAWpGQwfJisN0 JawlgfhPsYAq1eL9BqPgLJM3yrp6e1umbf4V9jToGEW2YdvbPrPL/YZXqGBoIj4Zvs5C cZ+3BUEg4WQP8Bfct+nWZiGQRxbRincgPZ1XAHMcLQLJImlN0JTbT4RFKTsGdzKzy2lm ObHw== X-Received: by 10.14.218.8 with SMTP id j8mr3553448eep.129.1374015852814; Tue, 16 Jul 2013 16:04:12 -0700 (PDT) Original-Received: by 10.14.142.4 with HTTP; Tue, 16 Jul 2013 16:03:32 -0700 (PDT) In-Reply-To: <83ehay2vgw.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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:76407 Archived-At: Package: emacs Version: 24.3.50 X-Debbugs-Cc: eliz@gnu.org Filed. ---------- Forwarded message ---------- From: Eli Zaretskii Date: Tue, Jul 16, 2013 at 8:47 PM Subject: Re: A significant slowdown calling font-lock-fontify-buffer from a hook To: Juanma Barranquero Cc: emacs-devel@gnu.org > From: Juanma Barranquero > Date: Tue, 16 Jul 2013 20:26:56 +0200 > Cc: Emacs developers > > > Is the "calling from a hook" an important part of this issue? > > Doing > > emacs -Q src/xdisp.c > M-x font-lock-fontify-buffer > > I don't see the slowdown. First, you need to turn off global-font-lock-mode before visiting xdisp.c. Second, if you do turn off global-font-lock-mode, invoking font-lock-fontify-buffer will fail in Emacs 24.3. You need to do something like this instead: M-: (let ((c-standard-font-lock-fontify-region-function 'font-lock-default-fontify-region)) (font-lock-fontify-buffer)) RET If I do this in Emacs 24.3 and in the current trunk, I do see a significant slowdown: it takes 18 sec with 24.3, and 72 sec with the current trunk. So I think the invocation from hook is not a factor here, which is a Good Thing, because debugging this will be much simpler ;-)