From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: open large file with C code: is it realy should be so slow? Date: Mon, 1 Dec 2008 12:37:16 +0000 Message-ID: <20081201123716.GA3603@muc.de> References: <2a382c6e0812010201h7a2507fbg66a38f392d9837a9@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1228134237 21222 80.91.229.12 (1 Dec 2008 12:23:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Dec 2008 12:23:57 +0000 (UTC) Cc: bug-cc-mode@gnu.org, emacs-devel@gnu.org To: Dave Milter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 01 13:25:01 2008 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 1L77pj-0005BB-7R for ged-emacs-devel@m.gmane.org; Mon, 01 Dec 2008 13:24:59 +0100 Original-Received: from localhost ([127.0.0.1]:55472 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L77oZ-0005l8-1T for ged-emacs-devel@m.gmane.org; Mon, 01 Dec 2008 07:23:47 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L77oU-0005k9-Ae for emacs-devel@gnu.org; Mon, 01 Dec 2008 07:23:42 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L77oS-0005jx-TF for emacs-devel@gnu.org; Mon, 01 Dec 2008 07:23:42 -0500 Original-Received: from [199.232.76.173] (port=56467 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L77oS-0005ju-Mn for emacs-devel@gnu.org; Mon, 01 Dec 2008 07:23:40 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:3216 helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L77oS-0001pQ-7k for emacs-devel@gnu.org; Mon, 01 Dec 2008 07:23:40 -0500 Original-Received: (qmail 73982 invoked by uid 3782); 1 Dec 2008 12:23:31 -0000 Original-Received: from acm.muc.de (pD9E52890.dip.t-dialin.net [217.229.40.144]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Mon, 01 Dec 2008 13:23:29 +0100 Original-Received: (qmail 4798 invoked by uid 1000); 1 Dec 2008 12:37:16 -0000 Content-Disposition: inline In-Reply-To: <2a382c6e0812010201h7a2507fbg66a38f392d9837a9@mail.gmail.com> User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-operating-system: by monty-python.gnu.org: FreeBSD 4.6-4.9 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:106363 Archived-At: Hi, Dave! On Mon, Dec 01, 2008 at 01:01:08PM +0300, Dave Milter wrote: > I have problem with emacs responsibility, > I work with large enough C header files, > and when I want to scroll it using mouse's wheel or > page (up|down) keys emacs stop react on any keys, like (ctrl+g), > and eats 100% of CPU's time during long period, > I wonder is this a bug, or expected behaviour? It's a bug. Although C Mode works "properly" here, it doesn't seem to be tuned very well for files like this one (At91SAM9253_inc.h), which contain a lot of #defines and comments and nothing else. The only workaround I can suggest at the moment is to turn font-locking off in these buffers. This is clearly unsatisfactory. Sorry. > My cpu frequnce is 2200.000MHz. > elp results are: [ Thanks for these! ] > Version: > GNU Emacs 22.3.1 (i686-pc-linux-gnu, GTK+ Version 2.12.8) > I tried Visual C++ 6.0 under wine, > and gvim, and they works without any delays, > highlight syntax and allow scrolling. > If somebody wnat reproduce this behaviour, > here is link to source code with which I working: > http://www.atmel.com/dyn/resources/prod_documents/AT91Bootstrap1.10.zip > there are files in it like > include/AT91SAM9263_inc.h > it contains around 4000 lines of code, > most of which is comments or #define I will try to fix this bug, though this could be quite difficult and take some time. Thanks very much indeed for taking the trouble to report it. -- Alan Mackenzie (Nuremberg, Germany).