GNU bug report logs -
#40052
CC Mode 5.34 (C++//l); cc-mode hangs fontifying src/hotspot/share/runtime/globals.hpp in OpenJDK
Previous Next
Reported by: Nick Gasson <nick.gasson <at> arm.com>
Date: Fri, 13 Mar 2020 14:33:02 UTC
Severity: normal
Done: Alan Mackenzie <acm <at> muc.de>
Bug is archived. No further changes may be made.
Full log
Message #17 received at 40052 <at> debbugs.gnu.org (full text, mbox):
>
> OK, thanks. I've had another look into CC Mode, and found a bug in the
> handling of its macro cache. It isn't saving the position of the end of
> the macro, hence is doing too much scanning.
>
> I've fixed this in the following patch, which gives another factor of ~5
> speedup in the scrolling. Please remove the previous patch before
> applying this new one.
>
> However, the scrolling still gets sluggish towards the end of
> globals.hpp. This is because CC Mode's function which goes back to the
> beginning of a statement is scanning back over the entire macro. It
> basically looks for semicolons or closing braces (at top level) and
> there are none in the huge macro. I tried creating a variant of
> globals.hpp, where each "function call" was terminated by a semicolon.
> The sluggishness was entirely fixed. This is largely theoretical, as I
> assume you have no control over the contents of globals.hpp.
>
> Anyhow, here is the patch. Please let me know if there are still
> problems with it. Thanks!
>
Hi Alan,
I tried the second patch and it's working well. Thanks again.
There was some discussion of getting rid of the giant macro on the
OpenJDK mailing list. That's when I realised several other people had
the same problem opening that file in Emacs.
https://mail.openjdk.java.net/pipermail/hotspot-dev/2020-March/041088.html
Nick
This bug report was last modified 5 years and 65 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.