From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: extremely slow font-lock-mode Date: Tue, 11 Dec 2007 23:32:03 +0100 Message-ID: <475F0FE3.7000802@gmx.at> References: <475E659F.4000303@os.inf.tu-dresden.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1197412487 6352 80.91.229.12 (11 Dec 2007 22:34:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Dec 2007 22:34:47 +0000 (UTC) Cc: emacs-devel@gnu.org To: Martin Pohlack Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 11 23:34:58 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1J2Dgn-0001jZ-Tm for ged-emacs-devel@m.gmane.org; Tue, 11 Dec 2007 23:34:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J2DgW-0007yM-2s for ged-emacs-devel@m.gmane.org; Tue, 11 Dec 2007 17:34:40 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J2Deb-0006VF-Dg for emacs-devel@gnu.org; Tue, 11 Dec 2007 17:32:41 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J2DeZ-0006TB-5m for emacs-devel@gnu.org; Tue, 11 Dec 2007 17:32:40 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J2DeY-0006T5-Rw for emacs-devel@gnu.org; Tue, 11 Dec 2007 17:32:38 -0500 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1J2DeY-0008LC-NO for emacs-devel@gnu.org; Tue, 11 Dec 2007 17:32:39 -0500 Original-Received: (qmail invoked by alias); 11 Dec 2007 22:32:37 -0000 Original-Received: from N832P009.adsl.highway.telekom.at (EHLO [62.47.47.233]) [62.47.47.233] by mail.gmx.net (mp012) with SMTP; 11 Dec 2007 23:32:37 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19vm5ozaCdvPz+DB9nCAR2nUZ0m1Iib1y5P87wseU YF19k8s7ZRE1Tv User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: <475E659F.4000303@os.inf.tu-dresden.de> X-Y-GMX-Trusted: 0 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:85068 Archived-At: > I'm experiencing very slow syntax highlighting with emacs-23.0.60 > (GTK+ Version 2.12.1). > > Simply scrolling in source files takes incredibly long (~ 1 second for > scolling one line backwards). This is an a dual-core 2 GHZ machine > ... > I tried to play with all font-lock and jit-lock customization options > but only turning font-lock off seemed to make a difference. > > I tried to use elp to instrument relevant packages (mwheel, font-lock, > jit-lock, mouse, lazy-lock, fast-lock). After some scrolling (~ 20 > seconds, with pauses, mouse wheel, pg-keys and scrollbar) I get > the following results: I suppose you did not turn on lazy-lock or fast-lock, hence these two are hardly relevant here. > So, mwheel-scroll seems to behave badly. Not necessarily. The figures you see here may comprise font-locking and many other things. > However, lots of the > problematic calls also seem to have been lost. E.g., scrolling with > keyboard was also very slow and is not shown in the table. You probably didn't instrument that. > I also noticed, that scrolling forward seems to go considerably faster > than scrolling backwards (maybe this has to do with syntax-driven > jit-lock?). Usually it's slower only if you scroll back into _not yet fontified_ areas. > The results are twofold for me: > > First, I don't seem to be using elp right or it is the wrong tool. You did use it right but it's probably not the right tool for finding the cause of the problem. > Ideally, I would like to use a /sampling/ profiler for emacs. > - Is there such a thing that can look into running lisp code? > - How should I be using elp differently for getting meaningful > results? > > Second, font-lock-mode is currently unusable for me. I started emacs > with -q, so I don't think my local tweak are to blame. emacs-22 on my > local machine is incredibly fast for the same file (also started with > -q). > - What might be to blame here? First of all we have to find out whether this is mode specific. Often a badly constructed regexp can cause such problems. Did you try with different major modes? Next you should try if it's buffer specific. Can you post the file showing the bug (maybe it's only a small part of the file that exhibits the problem). > - Do you need more details on any aspect of my machine configuration? Please send these details just as if you reported a bug.