GNU bug report logs -
#33670
26.1; very large c++-mode yank performance regression 25.3_1-x86_64 -> 26.1-x86_64
Previous Next
Reported by: Chris Hecker <checker <at> d6.com>
Date: Sat, 8 Dec 2018 02:43:02 UTC
Severity: normal
Tags: moreinfo
Found in version 26.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 33670 <at> debbugs.gnu.org (full text, mbox):
> From: Chris Hecker <checker <at> d6.com>
> Date: Fri, 7 Dec 2018 18:42:23 -0800
>
> If I start emacs and visit a moderately large cpp file (18k LOC), and go
> to the same place in the middle of the file in both versions of emacs,
> then kill and yank the current line, the performance on 26.1 is easily
> 10x worse...the yank is instant in 25.3_1 and takes literally almost a
> second on 26.1 sometimes. I decided to test this with a profiler run,
> so I went to the same line in both, killed the line, and evaled this:
>
> (progn (profiler-start 'cpu) (yank) (profiler-report) (profiler-stop))
>
> Here are the results:
>
> 25.3_1:
>
> - ... 1 100%
> Automatic GC 1 100%
>
>
> 26.1:
> - command-execute 14 100%
> - call-interactively 14 100%
> - funcall-interactively 14 100%
> - eval-expression 14 100%
> - eval 14 100%
> - progn 14 100%
> - yank 14 100%
> - insert-for-yank 14 100%
> - insert-for-yank-1 14 100%
> - c-after-change 13 92%
> - mapc 13 92%
> - #<compiled 0x9dcce1> 13 92%
> - c-after-change-re-mark-raw-strings 6 42%
> - c-in-literal 3 21%
Please load cc-mode.el manually as a .el file, and then do this
experiment again and show the profile. As you see from the above,
most of the time is taken by some function in the
c-before-font-lock-functions, but it's hard to tell which, because
it is shown as a byte code. Emacs 26 puts 5 functions on
c-before-font-lock-functions, whereas Emacs 25 used only 2, and it's
IMO important to see which one(s) take the lion's share of time.
Also, do you see this kind of degradation in any C++ source file of
comparable size, or is that particular file you used for the profile
especially slow?
Finally, was the line you yanked a line of code or a part of a
comment (or some other syntactic element)? Does that matter?
Thanks.
This bug report was last modified 3 years and 82 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.