GNU bug report logs - #36183
26.1; prettify-symbols-mode high CPU usage in Windows 10

Previous Next

Package: emacs;

Reported by: Eduardo Duenez <e_duenez <at> hotmail.com>

Date: Wed, 12 Jun 2019 19:17:02 UTC

Severity: minor

Tags: moreinfo

Found in version 26.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 36183 in the body.
You can then email your comments to 36183 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#36183; Package emacs. (Wed, 12 Jun 2019 19:17:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eduardo Duenez <e_duenez <at> hotmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 12 Jun 2019 19:17:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Eduardo Duenez <e_duenez <at> hotmail.com>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: 26.1; prettify-symbols-mode high CPU usage in Windows 10
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))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36183; Package emacs. (Sat, 15 Jun 2019 08:36:01 GMT) Full text and rfc822 format available.

Message #8 received at 36183 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Eduardo Duenez <e_duenez <at> hotmail.com>, Tassilo Horn <tsdh <at> gnu.org>
Cc: 36183 <at> debbugs.gnu.org
Subject: Re: bug#36183: 26.1;
 prettify-symbols-mode high CPU usage in Windows 10
Date: Sat, 15 Jun 2019 11:34:59 +0300
> From: Eduardo Duenez <e_duenez <at> hotmail.com>
> 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.

Can you please send a sample file where you see this behavior?

Also, do you need to use AUCTeX for this to happen, or does it happen
even without AUCTeX, by just visiting a .tex file and activating the
prettify-symbols-mode?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36183; Package emacs. (Wed, 19 Jun 2019 17:12:02 GMT) Full text and rfc822 format available.

Message #11 received at 36183 <at> debbugs.gnu.org (full text, mbox):

From: Tassilo Horn <tsdh <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 36183 <at> debbugs.gnu.org, Eduardo Duenez <e_duenez <at> hotmail.com>
Subject: Re: bug#36183: 26.1;
 prettify-symbols-mode high CPU usage in Windows 10
Date: Wed, 19 Jun 2019 19:11:20 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Eduardo Duenez <e_duenez <at> hotmail.com>
>> 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.
>
> Can you please send a sample file where you see this behavior?
>
> Also, do you need to use AUCTeX for this to happen, or does it happen
> even without AUCTeX, by just visiting a .tex file and activating the
> prettify-symbols-mode?

FWIW, I cannot reproduce that behavior with some arbitrary LaTeX file
with auctex 12.1.2 from ELPA or with the stock latex-mode.  So either
it's something specific with your LaTeX file or your configuration.

In addition to what Eli said, it would also be interesting to profile
what emacs does during editing and moving point.  For that, you could do
this:

1. M-x profiler-start RET cpu RET in the problematic LaTeX file.
2. Activate prettify-symbols-mode.
3. Edit and move point so that emacs heats your CPU.
4. M-x profiler-report RET and then M-x profiler-stop RET.

Send us the contents of the *CPU-Profiler-Report ...* buffer.

Bye,
Tassilo




Added tag(s) moreinfo. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 19 Jun 2019 17:33:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36183; Package emacs. (Wed, 25 Sep 2019 14:42:02 GMT) Full text and rfc822 format available.

Message #16 received at 36183 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Tassilo Horn <tsdh <at> gnu.org>
Cc: 36183 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Eduardo Duenez <e_duenez <at> hotmail.com>
Subject: Re: bug#36183: 26.1; prettify-symbols-mode high CPU usage in
 Windows 10
Date: Wed, 25 Sep 2019 16:41:05 +0200
Tassilo Horn <tsdh <at> gnu.org> writes:

> In addition to what Eli said, it would also be interesting to profile
> what emacs does during editing and moving point.  For that, you could do
> this:
>
> 1. M-x profiler-start RET cpu RET in the problematic LaTeX file.
> 2. Activate prettify-symbols-mode.
> 3. Edit and move point so that emacs heats your CPU.
> 4. M-x profiler-report RET and then M-x profiler-stop RET.
>
> Send us the contents of the *CPU-Profiler-Report ...* buffer.

More information was requested, but no response was given within a few
months, so I'm closing this bug report.  If the problem still exists,
please reopen this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 36183 <at> debbugs.gnu.org and Eduardo Duenez <e_duenez <at> hotmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 25 Sep 2019 14:42:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 24 Oct 2019 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 186 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.