Subject: bug#36183: 26.1; prettify-symbols-mode high CPU usage in Windows 10

From: Eduardo Duenez <[email-masked]>
Date: Wed, 12 Jun 2019 17:52:23 +0000

"M-x prettify-symbols-mode" on a .tex buffer (AUCTeX major mode)
correctly prettifies symbols (Greek letters, math symbols, etc.)
However, any subsequent editing of the buffer becomes de facto
impossible because starting to type, moving, etc., results on 100%
usage of the CPU core emacs is running on for 1-3 seconds. If I
switch to another buffer or disable prettify-symbols-mode, CPU usage
eventually drops down to a typical 2%-4% during regular editing.

In GNU Emacs 26.1 (build 1, x86_64-w64-mingw32)
 of 2018-05-30 built on CIRROCUMULUS
Repository revision: 07f8f9bc5a51f5aa94eb099f3e15fbe0c20ea1ea
Windowing system distributor 'Microsoft Corp.', version 10.0.17763
Recent messages:
Mark saved where search started
ad-Advice-delete-char: Buffer is read-only: #<buffer *info*> [3 times]
Mark saved where search started [2 times]
Prettify-Symbols mode enabled in current buffer
Creating customization items...
Creating customization items ...done
Resetting customization items...done
Creating customization setup...done
To install your edits, invoke [State] and choose the Set operation
Prettify-Symbols mode disabled in current buffer

Configured using:
 'configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS THREADS LCMS2

Important settings:
  value of $LANG: ENU
  locale-coding-system: cp1252

Major mode: LaTeX/FMP

Minor modes in effect:
  text-scale-mode: t
  TeX-fold-mode: t
  reftex-mode: t
  flyspell-mode: t
  LaTeX-math-mode: t
  TeX-PDF-mode: t
  global-magit-file-mode: t
  diff-auto-refine-mode: t
  magit-auto-revert-mode: t
  auto-revert-mode: t
  global-git-commit-mode: t
  pyvenv-mode: t
  desktop-save-mode: t
  shell-dirtrack-mode: t
  outline-minor-mode: t
  helm-mode: t
  async-bytecomp-package-mode: t
  show-paren-mode: t
  savehist-mode: t
  cl-old-struct-compat-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-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
  size-indication-mode: t
  column-number-mode: t
  line-number-mode: t
  global-visual-line-mode: t
  visual-line-mode: t
  transient-mark-mode: t

Load-path shadows:
~/synchro/emacs.d/site-lisp/smerge-mode hides c:/Program Files/emacs/share/emacs/26.1/lisp/vc/smerge-mode
~/synchro/emacs.d/site-lisp/ps-mode hides c:/Program Files/emacs/share/emacs/26.1/lisp/progmodes/ps-mode
m:/Eduardo/.emacs.d/elpa/auctex-12.1.1/auctex hides m:/Eduardo/synchro/emacs.d/site-lisp/site-start.d/auctex

Features:
(shadow sort mail-extr emacsbug sendmail outshine-org-cmds outorg
tar-mode autoload lisp-mnt mm-archive network-stream starttls url-cache
helm-command helm-elisp helm-eval edebug helm-info misearch
multi-isearch face-remap reftex-sel cursor-sensor reftex-ref
reftex-parse reftex-toc bug-reference tex-fold preview prv-emacs tex-buf
reftex-dcr reftex reftex-loaddefs reftex-vars cdlatex texmathp flyspell
ispell font-latex latex latex-flymake tex-ispell tex-style tex tex-mode
latexenc image-file helm-external helm-net xml ffap magit-obsolete
magit-blame magit-stash magit-bisect magit-remote magit-commit
magit-sequence magit-notes magit-worktree magit-tag magit-merge
magit-branch magit-reset magit-collab ghub url-http tls gnutls url-gw
nsm url-auth url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf url-util mailcap let-alist magit-files
magit-refs magit-status subr-x magit magit-repos magit-apply magit-wip
magit-log magit-diff smerge-mode diff-mode magit-core magit-autorevert
autorevert filenotify magit-process magit-margin magit-mode git-commit
magit-git magit-section magit-utils crm magit-popup log-edit message rmc
puny rfc822 mml mml-sec epa derived epg gnus-util rmail rmail-loaddefs
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader
pcvs-util add-log with-editor winner paredit pp cl-extra yasnippet
highlight-indentation flymake-proc flymake warnings company pcase
help-fns radix-tree help-mode elpy pyvenv elpy-profile elpy-django s
elpy-refactor python tramp-sh json map grep files-x etags xref project
server desktop frameset gnuplot-mode ido ess-toolbar ess-mouse ess-dde
mouseme thingatpt browse-url ess-swv ess-noweb ess-noweb-font-lock-mode
ess-bugs-l ess-sas-d ess-sas-l ess-sas-a ess-stata-mode ess-stata-lang
cc-vars cc-defs make-regexp essd-els ess-sp6w-d ess-sp3-d ess-julia
julia-mode ess-r-mode ess-r-package ess-r-syntax ess-r-completion
ess-roxy essddr ess-rd hideshow ess-s-lang ess-help ess ess-mode
ess-noweb-mode ess-inf ess-tracebug compile tramp tramp-compat
tramp-loaddefs trampver ucs-normalize shell parse-time ess-generics
ess-custom executable ess-compat ess-utils ess-site dired-x dired
dired-loaddefs re-builder org-element avl-tree generator org org-macro
org-footnote org-pcomplete pcomplete org-list org-faces org-entities
noutline outline org-version ob-emacs-lisp ob ob-tangle org-src ob-ref
ob-lob ob-table ob-keys ob-exp ob-comint comint ansi-color ring ob-core
ob-eval org-compat org-macs org-loaddefs find-func cal-menu calendar
cal-loaddefs preview-latex helm-mode helm-files helm-buffers helm-tags
helm-locate helm-grep helm-regexp format-spec helm-utils helm-help
helm-types helm easy-mmode helm-source eieio-compat helm-multi-match
helm-lib helm-config helm-easymenu edmacro kmacro async-bytecomp async
advice misc paren savehist avoid solarized-dark-theme solarized dash
cus-edit cus-start cus-load elec-pair color-theme wid-edit cl
color-theme-wombat finder-inf tex-site racket-mode-autoloads rx info
package easymenu epg-config url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs eieio-loaddefs password-cache url-vars seq
byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib time-date
mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win
w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame 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 charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote w32notify w32 lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 1292732 154223)
 (symbols 56 55950 1)
 (miscs 48 2298 2007)
 (strings 32 213434 24925)
 (string-bytes 1 5953503)
 (vectors 16 90622)
 (vector-slots 8 2146240 148464)
 (floats 8 552 918)
 (intervals 56 89660 433)
 (buffers 992 53))