GNU bug report logs - #25706
26.0.50; Slow C file fontification

Previous Next

Packages: cc-mode, emacs;

Reported by: Sujith <m.sujith <at> gmail.com>

Date: Mon, 13 Feb 2017 18:41:01 UTC

Severity: normal

Tags: moreinfo

Found in version 26.0.50

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


Message #119 received at 25706 <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: Ravine Var <ravine.var <at> gmail.com>
Cc: 25706 <at> debbugs.gnu.org
Subject: Re: bug#25706: 26.0.50; Slow C file fontification
Date: Thu, 10 Dec 2020 08:08:44 +0000
Hello again, Ravine.

On Wed, Dec 09, 2020 at 13:17:23 +0530, Ravine Var wrote:
> I came across another place where a similar lockup happens
> (even with the patches posted here).

> https://gitlab.com/wireshark/wireshark/-/raw/master/epan/dissectors/packet-rrc.c

> Towards the end of the file, once we get to the function
> proto_register_rrc(void), the slowdown of scrolling starts and eventually
> things freeze.

Outch!  That's a 50,000 line long function.  ;-(  I've lost some naivety
about "reasonableness" in the past week or two.

> Just copying that function to a smaller C file is enough to
> reproduce the issue. (I found that C-M-h is a nifty command to do this.)

> I can open a new bug report if required.

Would you do this, please.  The mechanism for the slowdown in that
function is entirely different from that in the .h files with lots of
macros.  In the .c file, there are lots and lots of braces, and it seems
we need a new cache to handle them faster.  In the .h files, there are
no braces, and we needed to put limits into backward searches.

Thanks again for taking the trouble to report all these bugs.

-- 
Alan Mackenzie (Nuremberg, Germany).




This bug report was last modified 4 years and 214 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.