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: Cc-mode font-lock too slow with large file Date: Fri, 18 Oct 2013 19:26:31 +0000 Message-ID: <20131018192631.GA3012@acm.acm> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1382124522 1749 80.91.229.3 (18 Oct 2013 19:28:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Oct 2013 19:28:42 +0000 (UTC) Cc: emacs-devel@gnu.org To: "kona.ming" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 18 21:28:46 2013 Return-path: Envelope-to: ged-emacs-devel@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 1VXFj3-00072R-6W for ged-emacs-devel@m.gmane.org; Fri, 18 Oct 2013 21:28:45 +0200 Original-Received: from localhost ([::1]:59160 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXFj2-0004sj-O3 for ged-emacs-devel@m.gmane.org; Fri, 18 Oct 2013 15:28:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58604) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXFiu-0004jt-K6 for emacs-devel@gnu.org; Fri, 18 Oct 2013 15:28:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VXFio-0007Dh-TS for emacs-devel@gnu.org; Fri, 18 Oct 2013 15:28:36 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:43345 helo=mail.muc.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXFio-0007Aw-KO for emacs-devel@gnu.org; Fri, 18 Oct 2013 15:28:30 -0400 Original-Received: (qmail 25044 invoked by uid 3782); 18 Oct 2013 19:28:29 -0000 Original-Received: from acm.muc.de (pD9518115.dip0.t-ipconnect.de [217.81.129.21]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 18 Oct 2013 21:28:28 +0200 Original-Received: (qmail 4603 invoked by uid 1000); 18 Oct 2013 19:26:31 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 8.x X-Received-From: 193.149.48.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:164326 Archived-At: On Tue, Oct 15, 2013 at 05:27:14PM +0800, kona.ming wrote: > I have a large c file,about 10000 lines. I can't scroll it after open, > has 2 or 3 seconds lag. The font-lock-maxium-decoration is t, set it to > 2 will better but still lag. How to making emacs working on the file? This is not usual in C files. For example, xdisp.c (part of Emacs) is ~30,000 lines long, but scrolls reasonably fast. It may be that there's something unusual about your file which is making C Mode slow - something like a very large macro, or a very large enum. Firstly, could you please tell us what version of Emacs and CC Mode you're using. (M-x emacs-version and M-x c-version). Is the lag as bad if you start Emacs as emacs -Q? Would it be possible for you to send me the file? If so, please send it to , and tell me anything I need to do to make it slow. Then I can investigate the problem directly. > 从三星移动设备发送 -- Alan Mackenzie (Nuremberg, Germany).