all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Chris Hecker <checker@d6.com>
Cc: 33670@debbugs.gnu.org
Subject: bug#33670: 26.1; very large c++-mode yank performance regression 25.3_1-x86_64 -> 26.1-x86_64
Date: Sat, 08 Dec 2018 09:49:20 +0200	[thread overview]
Message-ID: <83bm5w5ugv.fsf@gnu.org> (raw)
In-Reply-To: <647599b2-0aae-8654-a662-a8142dd360d2@d6.com> (message from Chris Hecker on Fri, 7 Dec 2018 18:42:23 -0800)

> From: Chris Hecker <checker@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.





  parent reply	other threads:[~2018-12-08  7:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-08  2:42 bug#33670: 26.1; very large c++-mode yank performance regression 25.3_1-x86_64 -> 26.1-x86_64 Chris Hecker
2018-12-08  2:56 ` bug#33670: adding some info to my yank perf regression Chris Hecker
2018-12-08  7:49 ` Eli Zaretskii [this message]
     [not found] ` <mailman.5359.1544236991.1284.bug-gnu-emacs@gnu.org>
2018-12-08 20:40   ` bug#33670: 26.1; very large c++-mode yank performance regression 25.3_1-x86_64 -> 26.1-x86_64 Alan Mackenzie
2018-12-08 21:31     ` Chris Hecker
2018-12-09 12:01       ` Alan Mackenzie
2018-12-09 17:57         ` Chris Hecker
2018-12-09 18:26           ` Alan Mackenzie
2022-01-29 15:20             ` Lars Ingebrigtsen
2022-01-29 16:35               ` Alan Mackenzie
2022-02-28  9:53                 ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83bm5w5ugv.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=33670@debbugs.gnu.org \
    --cc=checker@d6.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.