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: 33% speed up in CC Mode scrolling. Date: Mon, 27 Jun 2016 12:49:16 +0000 Message-ID: <20160627124916.GB4526@acm.fritz.box> References: <20160615222015.GA4813@acm.fritz.box> <5770C84E.30208@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1467031771 3241 80.91.229.3 (27 Jun 2016 12:49:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Jun 2016 12:49:31 +0000 (UTC) Cc: Eli Zaretskii , John Wiegley , emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 27 14:49:23 2016 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 1bHVya-0001jL-It for ged-emacs-devel@m.gmane.org; Mon, 27 Jun 2016 14:49:20 +0200 Original-Received: from localhost ([::1]:58499 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHVyZ-0006fj-Tk for ged-emacs-devel@m.gmane.org; Mon, 27 Jun 2016 08:49:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55444) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHVyT-0006fP-DL for emacs-devel@gnu.org; Mon, 27 Jun 2016 08:49:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHVyQ-0005GW-6b for emacs-devel@gnu.org; Mon, 27 Jun 2016 08:49:13 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:62851) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHVyP-0005G2-SB for emacs-devel@gnu.org; Mon, 27 Jun 2016 08:49:10 -0400 Original-Received: (qmail 45700 invoked by uid 3782); 27 Jun 2016 12:49:07 -0000 Original-Received: from acm.muc.de (p548C72E2.dip0.t-ipconnect.de [84.140.114.226]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 27 Jun 2016 14:49:05 +0200 Original-Received: (qmail 5217 invoked by uid 1000); 27 Jun 2016 12:49:16 -0000 Content-Disposition: inline In-Reply-To: <5770C84E.30208@gmx.at> User-Agent: Mutt/1.5.24 (2015-08-30) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-Received-From: 193.149.48.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:204803 Archived-At: Hello, Martin. On Mon, Jun 27, 2016 at 08:31:42AM +0200, martin rudalics wrote: > > I've just committed b76385c05076f0adaf7cf89d0ed95dfe5e8570e0 to the > > master branch. This takes some code out of CC Mode's font-locking's > > hottest loop and puts it back in again in a place where is gets called > > less often. > > This speeds up CC Mode's scrolling (as measured on our favourite file, > > xdisp.c) by about one third. There may be scope for further optimisation > > of this code. > > This is a substantial and worthwhile, although not spectacular, speed up > > of CC Mode. > This change has hardly any effect here. Scrolling xdisp.c with a '-O0 > -g2 -gdwarf-2' build run via emacs -Q is still virtually impossible. Could you, perhaps, try running with font-lock-maximum-decoration set to 2 for C Mode? This gives a speed advantage of around a factor of 3 over decoration level 3, at a cost of some inaccuracies. I have not finished squeezing cycles out of level 3 font locking. I can foresee a total speed up of around 70% (from before the recent 33%). > martin -- Alan Mackenzie (Nuremberg, Germany).