GNU bug report logs -
#30367
26.0.91; CC-Mode: Major slowdown when isearching big C++ file.
Previous Next
Reported by: Bastian Beischer <bastian.beischer <at> gmail.com>
Date: Tue, 6 Feb 2018 10:36:02 UTC
Severity: normal
Merged with 30849
Found in versions 26.0.91, 27.0.50
Fixed in version 27.1
Done: Alan Mackenzie <acm <at> muc.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hello, Bastian.
On Wed, Feb 07, 2018 at 23:45:03 +0100, Bastian Beischer wrote:
> On Wed, Feb 7, 2018 at 11:26 PM, Alan Mackenzie <acm <at> muc.de> wrote:
> > Hello, Bastian.
[ .... ]
> >> then search for 'isinsha'.
> > Yes, searching for "isinsha", I see the slowdown. Thanks! I also see
> > c-looking-at-or-maybe-in-bracelist as taking an excessive amount of
> > processing.
> > So I can reproduce it!
> Great, so our results are consistent.
I think I understand what's happening, now.
c-looking-at-or-maybe-in-bracelist attempts to go back over the innards
of a brace list to the enclosing "{". At L+122, in new handling for a
comma, I rather rashly inserted a `c-go-up-list-backward' to test whether
the comma is inside a brace. This was in a loop, once for each sexp.
In your sample file there is, at L10,653 a construct at top level with
_lots_ of commas. My loop is trying to go to the non-existent containing
brace for each of these commas, so ends up scanning to BOB for each of
them. This entire activity will be being done several times.
I timed a single `c-go-up-list-backward' from one of these commas at
0.033 seconds. 30 of these take about a second, and my machine is
anything but slow.
So, I just need to work out a way of fixing this, which may take some
while (sorry).
Thanks again for reporting the bug.
[ .... ]
> Cheers
> Bastian
--
Alan Mackenzie (Nuremberg, Germany).
This bug report was last modified 7 years and 113 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.