GNU bug report logs - #41267
26.3; Frame creation spends 1-2s in face-set-after-frame-default

Previous Next

Package: emacs;

Reported by: Jamie Brandon <jamie <at> scattered-thoughts.net>

Date: Thu, 14 May 2020 18:40:01 UTC

Severity: normal

Tags: moreinfo, patch

Merged with 41200

Found in version 26.3

Fixed in version 28.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 41267 in the body.
You can then email your comments to 41267 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#41267; Package emacs. (Thu, 14 May 2020 18:40:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jamie Brandon <jamie <at> scattered-thoughts.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 14 May 2020 18:40:01 GMT) Full text and rfc822 format available.

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

From: Jamie Brandon <jamie <at> scattered-thoughts.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.3; Frame creation spends 1-2s in face-set-after-frame-default
Date: Thu, 14 May 2020 11:34:49 -0700
When I launch emacsclient or make a new frame it spends 1-2s in:

   - make-frame                                                   312  42%
    - frame-creation-function                                     311  42%
     - apply                                                      311  42%
      - #<compiled 0x3edba9>                                      311  42%
       - x-create-frame-with-faces                                311  42%
        - face-set-after-frame-default                            287  39%
         + face-spec-recalc                                       274  37%

If I replace face-spec-recalc with an empty function then the new frame loads instantly so I'm pretty sure that's the culprit.

I have 523 faces in frame-face-alist but they all seem to be from packages I use regularly so I can't just get rid off them. Magit and notmuch account for a large minority of them.

https://emacs.stackexchange.com/questions/58505/emacsclient-spending-a-lot-of-time-resetting-faces suggested that this is unexpected and should be reported as a bug. 

---

In GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.13)
Windowing system distributor 'The X.Org Foundation', version 11.0.12008000
Recent messages:
widget-before-change: Text is read-only: "Attempt to change text outside editable field"
Syncing...
(Shell command succeeded with no output)
Quit [2 times]
mwheel-scroll: Beginning of buffer [13 times]
widget-before-change: Text is read-only: "Attempt to change text outside editable field"
Mark set
When done with this frame, type M-x delete-frame [2 times]
funcall-interactively: End of buffer

Configured using:
 'configure
 --prefix=/nix/store/wdad52z5419zhwv1ylha9vxhmcmrgvvc-emacs-26.3
 --disable-build-details --with-modules --with-x-toolkit=gtk3
 --with-xft CFLAGS=-DMAC_OS_X_VERSION_MAX_ALLOWED=101200'

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND DBUS GSETTINGS GLIB NOTIFY LIBSELINUX
GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD

Important settings:
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Text

Minor modes in effect:
  direnv-mode: t
  global-my-mode: t
  my-mode: t
  flyspell-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  show-paren-mode: t
  xterm-mouse-mode: t
  global-magit-file-mode: t
  diff-auto-refine-mode: t
  magit-auto-revert-mode: t
  global-auto-revert-mode: t
  global-git-commit-mode: t
  async-bytecomp-package-mode: t
  shell-dirtrack-mode: t
  ivy-mode: t
  delete-selection-mode: t
  auto-compile-on-load-mode: t
  auto-compile-on-save-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  visual-line-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/jamie/.emacs.d/elpa/notmuch-20200323.121/notmuch-wash hides /run/current-system/sw/share/emacs/site-lisp/notmuch-wash
/home/jamie/.emacs.d/elpa/notmuch-20200323.121/notmuch-hello hides /run/current-system/sw/share/emacs/site-lisp/notmuch-hello
/home/jamie/.emacs.d/elpa/notmuch-20200323.121/notmuch-print hides /run/current-system/sw/share/emacs/site-lisp/notmuch-print
/home/jamie/.emacs.d/elpa/notmuch-20200323.121/notmuch-company hides /run/current-system/sw/share/emacs/site-lisp/notmuch-company
/home/jamie/.emacs.d/elpa/notmuch-20200323.121/notmuch-mua hides /run/current-system/sw/share/emacs/site-lisp/notmuch-mua
/home/jamie/.emacs.d/elpa/notmuch-20200323.121/notmuch-draft hides /run/current-system/sw/share/emacs/site-lisp/notmuch-draft
/home/jamie/.emacs.d/elpa/notmuch-20200323.121/notmuch-jump hides /run/current-system/sw/share/emacs/site-lisp/notmuch-jump
/home/jamie/.emacs.d/elpa/notmuch-20200323.121/notmuch-lib hides /run/current-system/sw/share/emacs/site-lisp/notmuch-lib
/home/jamie/.emacs.d/elpa/notmuch-20200323.121/notmuch-tree hides /run/current-system/sw/share/emacs/site-lisp/notmuch-tree
/home/jamie/.emacs.d/elpa/notmuch-20200323.121/notmuch-crypto hides /run/current-system/sw/share/emacs/site-lisp/notmuch-crypto
/home/jamie/.emacs.d/elpa/notmuch-20200323.121/notmuch-query hides /run/current-system/sw/share/emacs/site-lisp/notmuch-query
/home/jamie/.emacs.d/elpa/notmuch-20200323.121/notmuch-maildir-fcc hides /run/current-system/sw/share/emacs/site-lisp/notmuch-maildir-fcc
/home/jamie/.emacs.d/elpa/notmuch-20200323.121/notmuch-show hides /run/current-system/sw/share/emacs/site-lisp/notmuch-show
/home/jamie/.emacs.d/elpa/notmuch-20200323.121/coolj hides /run/current-system/sw/share/emacs/site-lisp/coolj
/home/jamie/.emacs.d/elpa/notmuch-20200323.121/notmuch-compat hides /run/current-system/sw/share/emacs/site-lisp/notmuch-compat
/home/jamie/.emacs.d/elpa/notmuch-20200323.121/notmuch-address hides /run/current-system/sw/share/emacs/site-lisp/notmuch-address
/home/jamie/.emacs.d/elpa/notmuch-20200323.121/notmuch-parser hides /run/current-system/sw/share/emacs/site-lisp/notmuch-parser
/home/jamie/.emacs.d/elpa/notmuch-20200323.121/notmuch-tag hides /run/current-system/sw/share/emacs/site-lisp/notmuch-tag
/home/jamie/.emacs.d/elpa/notmuch-20200323.121/notmuch hides /run/current-system/sw/share/emacs/site-lisp/notmuch
/home/jamie/.emacs.d/elpa/notmuch-20200323.121/notmuch-message hides /run/current-system/sw/share/emacs/site-lisp/notmuch-message
/run/current-system/sw/share/emacs/site-lisp/site-start hides /nix/store/wdad52z5419zhwv1ylha9vxhmcmrgvvc-emacs-26.3/share/emacs/site-lisp/site-start
/home/jamie/.emacs.d/elpa/flymake-1.0.8/flymake hides /nix/store/wdad52z5419zhwv1ylha9vxhmcmrgvvc-emacs-26.3/share/emacs/26.3/lisp/progmodes/flymake
/home/jamie/.emacs.d/elpa/let-alist-1.0.6/let-alist hides /nix/store/wdad52z5419zhwv1ylha9vxhmcmrgvvc-emacs-26.3/share/emacs/26.3/lisp/emacs-lisp/let-alist

Features:
(shadow sort company-oddmuse company-keywords company-etags etags
company-gtags company-dabbrev-code company-dabbrev company-files
company-capf company-cmake company-xcode company-clang
company-semantic company-eclim company-template company-bbdb
company-tern s dash-functional tern mail-extr emacsbug sendmail
network-stream starttls url-http tls gnutls url-gw nsm url-auth
url-cache parse-time vc-mtn vc-hg vc-git vc-bzr vc-src vc-sccs vc-svn
vc-cvs vc-rcs vc vc-dispatcher elfeed-show elfeed-search
magit-bookmark bookmark shr svg dom elfeed-csv elfeed elfeed-curl url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf elfeed-log elfeed-db elfeed-lib avl-tree generator
url-queue browse-url xml-query xml notmuch-jump esh-util init direnv
flyspell ispell notmuch hl-line notmuch-hello wid-edit notmuch-tree
notmuch-show notmuch-print notmuch-crypto notmuch-mua notmuch-message
notmuch-draft notmuch-maildir-fcc notmuch-address notmuch-company
notmuch-parser notmuch-wash coolj notmuch-query goto-addr icalendar
diary-lib diary-loaddefs cal-menu calendar cal-loaddefs notmuch-tag
notmuch-lib notmuch-version notmuch-compat mm-view mml-smime smime dig
mailcap ivy-xref format-all language-id eglot array jsonrpc ert pp
ewoc debug flymake-proc flymake warnings url-util rust-mode undo-tree
diff paren xt-mouse magit-submodule magit-obsolete magit-blame
magit-stash magit-reflog magit-bisect magit-push magit-pull
magit-fetch magit-clone magit-remote magit-commit magit-sequence
magit-notes magit-worktree magit-tag magit-merge magit-branch
magit-reset magit-files magit-refs magit-status magit magit-repos
magit-apply magit-wip magit-log which-func imenu magit-diff
smerge-mode diff-mode magit-core magit-autorevert autorevert
filenotify magit-margin magit-transient magit-process magit-mode
git-commit transient magit-git magit-section magit-utils crm log-edit
message rmc puny format-spec 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 async-bytecomp async shell pcomplete server deferred
markdown-mode noutline outline easy-mmode julia-mode
julia-mode-latexsubs hide-lines counsel xdg xref project dired
dired-loaddefs compile comint swiper ivy flx delsel ring colir color
ivy-overlay company-quickhelp pos-tip company edmacro kmacro pcase
flycheck cl-extra ansi-color json map find-func help-mode rx subr-x
dash multiple-cursors mc-hide-unmatched-lines-mode
mc-separate-operations rectangular-region-mode mc-mark-pop
mc-mark-more thingatpt mc-cycle-cursors mc-edit-lines
multiple-cursors-core advice rect jka-compr atom-one-dark-theme
time-date auto-compile packed finder-inf cl 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 mule-util tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type 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
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
threads dbusbind inotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 503125 298802)
 (symbols 48 46802 2)
 (miscs 40 178 409)
 (strings 32 200303 194203)
 (string-bytes 1 5806953)
 (vectors 16 75940)
 (vector-slots 8 1524646 148766)
 (floats 8 4543 7707)
 (intervals 56 575 246)
 (buffers 992 17))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41267; Package emacs. (Thu, 14 May 2020 18:59:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jamie Brandon <jamie <at> scattered-thoughts.net>
Cc: 41267 <at> debbugs.gnu.org
Subject: Re: bug#41267: 26.3;
 Frame creation spends 1-2s in face-set-after-frame-default
Date: Thu, 14 May 2020 21:57:59 +0300
merge 41267 41200
thanks

> From: Jamie Brandon <jamie <at> scattered-thoughts.net>
> Date: Thu, 14 May 2020 11:34:49 -0700
> 
> When I launch emacsclient or make a new frame it spends 1-2s in:
> 
>    - make-frame                                                   312  42%
>     - frame-creation-function                                     311  42%
>      - apply                                                      311  42%
>       - #<compiled 0x3edba9>                                      311  42%
>        - x-create-frame-with-faces                                311  42%
>         - face-set-after-frame-default                            287  39%
>          + face-spec-recalc                                       274  37%
> 
> If I replace face-spec-recalc with an empty function then the new frame loads instantly so I'm pretty sure that's the culprit.
> 
> I have 523 faces in frame-face-alist but they all seem to be from packages I use regularly so I can't just get rid off them. Magit and notmuch account for a large minority of them.
> 
> https://emacs.stackexchange.com/questions/58505/emacsclient-spending-a-lot-of-time-resetting-faces suggested that this is unexpected and should be reported as a bug. 

Thanks, this is a duplicate of bug#41200.




Merged 41200 41267. Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 14 May 2020 18:59:02 GMT) Full text and rfc822 format available.

Added tag(s) patch. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 13 Sep 2020 13:29:01 GMT) Full text and rfc822 format available.

Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 12 May 2021 20:31:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 41200 <at> debbugs.gnu.org and Clément Pit-Claudel <cpitclaudel <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 21 Jul 2021 14:03:02 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, 19 Aug 2021 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 248 days ago.

Previous Next


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