[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#22993: closed (25.0.92; OS X app nap slows down tt

From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#22993: closed (25.0.92; OS X app nap slows down tty emacsclient)
Date: Thu, 07 Jul 2016 18:56:01 +0000

Your message dated Thu, 7 Jul 2016 19:55:31 +0100
with message-id <address@hidden>
and subject line Re: bug#22993: Potential fix/workaround for 22993
has caused the debbugs.gnu.org bug report #22993,
regarding 25.0.92; OS X app nap slows down tty emacsclient
to be marked as done.

(If you believe you have received this mail in error, please contact

22993: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22993
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 25.0.92; OS X app nap slows down tty emacsclient Date: Fri, 11 Mar 2016 22:07:20 -0800

This has been a terribly frustrating bug to track down, but here it is, along with a repro. The gist is that if you run gui emacs  as a server on OS X, tty emacsclients connected to it are adversely affected when the Emacs.app goes into “App Nap” mode on OS X.


- On OS X El Capitan (probably works on Mavericks as well) run emacs -Q
- Do M-x server-start
- In terminal, run emacsclient --tty somefile
- Eval the following:

(defun test-app-nap ()
(message "Before %s" (current-time-string))
(message "After redisplay %s" (current-time-string))
(message "read-event %s" (read-event nil t 0.001))
(message "After %s" (current-time-string)))

- M-x test-app-nap and observe that it immediately shows "After "
- Wait for Emacs to switch to app nap. You may be able to monitor with
Activity Monitor, but emacs -Q doesn't always show up there. As long
as you are not focused on the GUI emacs, it should start to nap in a
minute or two.
- Back in the terminal, M-x test-app-nap
- You should see the "After redisplay " message for several
(probably 10) seconds before seeing the "After " message
- Switch to the emacs gui app, then back to the terminal and M-x
- It should be back to the immediate "After " message

App nap needs to be disabled in emacs, at least when the server is
running, but probably always. The typical workaround is to disable app
nap by going to the info window on the Emacs.app, but for some reason,
that checkbox is not available.

In GNU Emacs (x86_64-apple-darwin15.3.0, NS appkit-1404.34 Version 10.11.3 (Build 15D21))
of 2016-03-10 built on aaronmbp.local
Windowing system distributor 'Apple', version 10.3.1404
Configured using:
'configure --prefix=/usr/local/Cellar/emacs/25.0.92
--infodir=/usr/local/Cellar/emacs/25.0.92/share/info/emacs --with-xml2
--without-dbus --with-gnutls --with-rsvg --with-imagemagick --with-ns

Configured features:

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

Major mode: Lisp Interaction

Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-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
line-number-mode: t
transient-mark-mode: t

Recent messages:
Making completion list...
You can run the command ‘server-start’ with M-x ser-s RET
When done with a buffer, type C-x #
Mark set
Before wtf Fri Mar 11 21:58:32 2016
After redisplay Fri Mar 11 21:58:32 2016
read-event nil
After wtf Fri Mar 11 21:58:38 2016

Load-path shadows:
None found.

(shadow sort mail-extr emacsbug message dired format-spec rfc822 mml
mml-sec epg epg-config gnus-util mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util help-fns help-mode easymenu cl-loaddefs pcase
cl-lib mail-prsvr mail-utils term/xterm xterm server time-date mule-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel ns-win ucs-normalize term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core 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 charscript case-table epa-hook
jka-cmpr-hook help simple abbrev 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 kqueue cocoa ns multi-tty
make-network-process emacs)

Memory information:
((conses 16 202233 6734)
(symbols 48 19770 0)
(miscs 40 57 215)
(strings 32 15988 5464)
(string-bytes 1 458233)
(vectors 16 33517)
(vector-slots 8 645323 6669)
(floats 8 170 338)
(intervals 56 234 0)
(buffers 976 14))


--- End Message ---
--- Begin Message --- Subject: Re: bug#22993: Potential fix/workaround for 22993 Date: Thu, 7 Jul 2016 19:55:31 +0100 User-agent: Mutt/1.5.24 (2015-08-30)
On Sun, Jul 03, 2016 at 05:23:01PM +0000, Aaron Jensen wrote:
> > Sorry for taking so long to respond. I still see Emacs going into app
> > nap mode with this. Is it working for you?
> >
> Yes, it's working for me. I just tested it again. I have seen reports of it
> not working:

I'm going to push this change to master. In the worst case it doesn't
work for some people and nothing is different.

I can't see a better way of handling this problem.
Alan Third

--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]