Subject: 29.0.50; Editing C++ Files is Very Slow.

From: Yusuf Talha <[email-masked]>
Date: Sat, 13 Nov 2021 02:15:44 +0100 (CET)

When I open a C++ file in Emacs, editing and navigating commands
are taking so long with c++-mode.  I figured that the ‘c-fontify-new-found-type’
function in cc-engine.el causes it.   When I evaluate the old definition of
‘c-add-type’ function, it fixes the issue.   I would be glad if you can handle this.
Thank you.

In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, cairo version 1.17.4)
 of 2021-11-12 built on localhost
Repository revision: 18eec5720e3b49c0f9efb646bb896ba4e9549ea0
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12013000
System Description: Gentoo Linux

Configured using:
 'configure --prefix=/usr --build=x86_64-pc-linux-gnu
 --host=x86_64-pc-linux-gnu --mandir=/usr/share/man
 --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
 --localstatedir=/var/lib --datarootdir=/usr/share
 --disable-silent-rules --docdir=/usr/share/doc/emacs-29.0.9999
 --htmldir=/usr/share/doc/emacs-29.0.9999/html --libdir=/usr/lib64
 --program-suffix=-emacs-29-vcs --includedir=/usr/include/emacs-29-vcs
 --infodir=/usr/share/info/emacs-29-vcs --localstatedir=/var
 --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp
 --without-compress-install --without-hesiod --without-pop
 --with-file-notification=inotify --with-pdumper --enable-acl
 --with-dbus --with-modules --with-gameuser=:gamestat --with-libgmp
 --with-gpm --with-native-compilation --with-json --without-kerberos
 --without-kerberos5 --with-lcms2 --with-xml2 --with-mailutils
 --without-selinux --with-gnutls --without-libsystemd --with-threads
 --without-wide-int --with-zlib --with-sound=alsa --with-x --without-ns
 --without-gconf --without-gsettings --without-toolkit-scroll-bars
 --with-gif --with-jpeg --with-png --with-rsvg --with-tiff --with-xpm
 --without-imagemagick --with-xft --with-cairo --with-harfbuzz
 --without-libotf --without-m17n-flt --with-x-toolkit=no
 --with-dumping=pdumper 'CFLAGS=-march=native -mtune=native -O2 -pipe'
 CPPFLAGS= 'LDFLAGS=-Wl,-O1 -Wl,--as-needed''

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM HARFBUZZ JPEG JSON LCMS2
LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY OLDXMENU PDUMPER PNG RSVG
SECCOMP SOUND THREADS TIFF WEBP X11 XDBE XIM XPM ZLIB

Important settings:
 value of $LANG: en_US.utf8
 locale-coding-system: utf-8-unix

Major mode: Text

Minor modes in effect:
 shell-dirtrack-mode: t
 electric-pair-mode: t
 display-time-mode: t
 display-battery-mode: t
 dired-async-mode: t
 tooltip-mode: t
 global-eldoc-mode: t
 show-paren-mode: t
 electric-quote-mode: t
 electric-indent-mode: t
 mouse-wheel-mode: t
 tab-bar-mode: t
 file-name-shadow-mode: t
 global-font-lock-mode: t
 font-lock-mode: t
 blink-cursor-mode: t
 auto-composition-mode: t
 auto-encryption-mode: t
 auto-compression-mode: t
 column-number-mode: t
 line-number-mode: t
 indent-tabs-mode: t
 transient-mark-mode: t

Load-path shadows:
/usr/share/emacs/site-lisp/cmake-mode hides /usr/share/emacs/site-lisp/cmake/cmake-mode
/usr/share/emacs/site-lisp/desktop-entry-mode hides /usr/share/emacs/site-lisp/desktop-file-utils/desktop-entry-mode

Features:
(uudecode uce supercite regi spam-report spam spam-stat gnus-uu yenc
gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime gnus-sum shr
kinsoku svg dom gnus-group gnus-undo gnus-start gnus-dbus gnus-cloud
nnimap nnmail mail-source nnoo gnus-spec gnus-int gnus-range gnus-win
smtpmail sieve-manage sasl sasl-anonymous sasl-login sasl-plain pop3
mspools mh-e mh-compat mh-buffers mh-loaddefs mairix imap rfc2104 utf7
hashcash gnus-dired fortune feedmail ecomplete binhex mail-hist epa-mail
add-log tramp tramp-loaddefs trampver tramp-integration files-x
tramp-compat parse-time iso8601 ls-lisp ntlm hmac-md5 hex-util md4 nsm
netrc net-utils ldap kermit shell pcomplete gravatar dns url-cache
gnutls eudc-vars dig bug-reference ange-ftp comint ansi-color mailalias
mailclient qp noutline outline kmacro facemenu two-column goto-addr view
shadow sort mail-extr emacsbug message yank-media rmc puny rfc822 mml
mml-sec epa derived epg rfc6068 epg-config mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail cc-bytecomp
cl-print apropos cus-edit pp cus-start pulse color xref project
eieio-opt cl-extra speedbar ezimage dframe find-func shortdoc cc-langs
thingatpt cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align
cc-engine cc-vars cc-defs misearch multi-isearch smerge-mode diff-mode
diff mule-util ebuild-mode skeleton sh-script smie executable
display-fill-column-indicator display-line-numbers server pinentry
format-spec modus-vivendi-theme modus-themes pcase gnus nnheader
gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums
text-property-search time-date mail-utils mm-util mail-prsvr wid-edit
elec-pair time battery dbus xml dired-async async dired-aux dired
dired-loaddefs cus-load google-translate-mode easy-mmode site-gentoo
geiser-impl help-fns radix-tree help-mode geiser-custom geiser-base ring
info package browse-url url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf url-util mailcap url-handlers
url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json map url-vars seq gv subr-x byte-opt bytecomp
byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc paren
electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite emoji-zwj charscript charprop case-table
epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice
button loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting font-render-setting cairo x multi-tty
make-network-process native-compile emacs)

Memory information:
((conses 16 507526 32717)
 (symbols 48 26920 7)
 (strings 32 91090 4235)
 (string-bytes 1 3058380)
 (vectors 16 55147)
 (vector-slots 8 1576641 38054)
 (floats 8 481 583)
 (intervals 56 9713 940)
 (buffers 992 26))