From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#25706: 26.0.50; Slow C file fontification Date: Mon, 30 Nov 2020 18:27:19 +0200 Message-ID: <83mtyykdy0.fsf@gnu.org> References: <87inoe2brv.fsf@the-damned> <55C404DC-1C29-449F-9A49-B20EDFFCFCEA@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31463"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, larsi@gnus.org, 25706@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 30 17:28:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kjm26-000826-LI for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 30 Nov 2020 17:28:10 +0100 Original-Received: from localhost ([::1]:38090 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kjm25-00016o-JO for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 30 Nov 2020 11:28:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58320) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kjm1x-00015X-Ts for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2020 11:28:01 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44902) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kjm1x-0000vy-Ml; Mon, 30 Nov 2020 11:28:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kjm1x-00066Y-JJ; Mon, 30 Nov 2020 11:28:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Mon, 30 Nov 2020 16:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25706 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 25706-submit@debbugs.gnu.org id=B25706.160675365623426 (code B ref 25706); Mon, 30 Nov 2020 16:28:01 +0000 Original-Received: (at 25706) by debbugs.gnu.org; 30 Nov 2020 16:27:36 +0000 Original-Received: from localhost ([127.0.0.1]:56448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjm1Y-00065m-FU for submit@debbugs.gnu.org; Mon, 30 Nov 2020 11:27:36 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjm1W-00065Y-QU for 25706@debbugs.gnu.org; Mon, 30 Nov 2020 11:27:35 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58997) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kjm1R-0000rs-0p; Mon, 30 Nov 2020 11:27:29 -0500 Original-Received: from [176.228.60.248] (port=3245 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kjm1P-0005Yv-La; Mon, 30 Nov 2020 11:27:28 -0500 In-Reply-To: <55C404DC-1C29-449F-9A49-B20EDFFCFCEA@acm.org> (message from Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= on Mon, 30 Nov 2020 13:46:30 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:194653 Archived-At: > From: Mattias EngdegÄrd > Date: Mon, 30 Nov 2020 13:46:30 +0100 > Cc: Alan Mackenzie , Lars Ingebrigtsen > > >> https://raw.githubusercontent.com/qca/qcamain_open_hal_public/master/hal/ar9300/osprey_reg_map_macro.h > > > > I tried reproducing this on a pretty new laptop, and opening the file in > > question (with your settings) took less than a second with Emacs 28. > > My lappy is less new but not really that slow -- compared to the hardware of the original reporter it's a speed demon -- > but opening the file takes almost 4 s here. More importantly, scrolling through the file is painfully slow. > > The code in the file is nothing out of the ordinary; it consists of macros that are 1-3 lines each; definitely not a pathological case. The entire fontification takes 64 s for this file. > > I'd say the complaint is warranted, even if the original reporter is no longer reachable. Reopen? > > Alan, do you have a diagnose? I suggest to run this under "M-x profiler-start" and post the fully expanded profile you get from that. Bonus points for doing that after loading the CC Mode files as .el (not .elc), which will make the profile more detailed.