From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: c-mode eats resources? Date: Mon, 20 Feb 2006 21:33:18 +0200 Organization: JURTA Message-ID: <873biekjy5.fsf@jurta.org> References: <200602182307.38095.pogonyshev@gmx.net> <200602182312.k1INCmL06749@raven.dms.auburn.edu> <878xs7mgzx.fsf@jurta.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1140486445 25949 80.91.229.2 (21 Feb 2006 01:47:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 21 Feb 2006 01:47:25 +0000 (UTC) Cc: pogonyshev@gmx.net, teirllm@dms.auburn.edu, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 21 02:47:22 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FBMcY-00081W-9O for ged-emacs-devel@m.gmane.org; Tue, 21 Feb 2006 02:47:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FBMcX-0001Fc-KF for ged-emacs-devel@m.gmane.org; Mon, 20 Feb 2006 20:47:17 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FBGvi-00082A-Ag for emacs-devel@gnu.org; Mon, 20 Feb 2006 14:42:42 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FBGvf-0007vc-HP for emacs-devel@gnu.org; Mon, 20 Feb 2006 14:42:41 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FBGvf-0007uk-0d for emacs-devel@gnu.org; Mon, 20 Feb 2006 14:42:39 -0500 Original-Received: from [194.126.101.111] (helo=mail.neti.ee) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FBH1k-0003RB-T0 for emacs-devel@gnu.org; Mon, 20 Feb 2006 14:48:57 -0500 Original-Received: from mail.neti.ee (80-235-46-171-dsl.mus.estpak.ee [80.235.46.171]) by Relayhost1.neti.ee (Postfix) with ESMTP id 0192160AA; Mon, 20 Feb 2006 21:42:33 +0200 (EET) Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: (Kim F. Storm's message of "Mon, 20 Feb 2006 09:18:25 +0100") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Virus-Scanned: by amavisd-new-2.2.1 (20041222) (Debian) at neti.ee X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:50829 Archived-At: >> (let ((start (float-time))) >> (font-lock-mode 1) >> (jit-lock-fontify-now (point-min) (point-max)) >> (- (float-time) start)) >> >> GNU Emacs 21.4 - 0.5 sec >> CVS 2004-04 - 3.5 sec >> CVS 2005-09 - 6.8 sec >> CVS 2006-02 - 10.0 sec >> >> Given a few percents of CPU utilization, no wonder that stealth >> fontification lasts several minutes. > > Does it help to increase the size of the regexp cache in search.c? > > #define REGEXP_CACHE_SIZE 20 I increased it to 2020 (this also required increasing NSTATICS twice to 5280), and on the first test (on the current CVS) the result was 7.0 sec. However, on subsequent evaluations the result started degrading: 1 - 7.0 2 - 7.0 3 - 8.4 4 - 9.5 5 - 9.5 After that, I reopened alloc.c, and again, on the first evaluation the result was 7.1 sec, but on subsequent tests the fontification time increased: 1 - 7.1 2 - 7.6 3 - 7.9 4 - 8.4 5 - 9.4 -- Juri Linkov http://www.jurta.org/emacs/