unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#22993: 25.0.92; OS X app nap slows down tty emacsclient
@ 2016-03-12  6:07 Aaron Jensen
  2016-03-12  8:03 ` bug#22993: Potential fix/workaround for 22993 Aaron Jensen
  0 siblings, 1 reply; 20+ messages in thread
From: Aaron Jensen @ 2016-03-12  6:07 UTC (permalink / raw)
  To: 22993


[-- Attachment #1.1: Type: text/plain, Size: 4655 bytes --]

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.

Repro:

- 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 ()

(interactive)

(message "Before %s" (current-time-string))

(redisplay)

(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

test-app-nap

- 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 25.0.92.1 (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

--enable-locallisppath=/usr/local/share/emacs/site-lisp

--infodir=/usr/local/Cellar/emacs/25.0.92/share/info/emacs --with-xml2

--without-dbus --with-gnutls --with-rsvg --with-imagemagick --with-ns

--disable-ns-self-contained'

Configured features:

JPEG RSVG IMAGEMAGICK NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS

NS

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

Auto-saving...

wtf

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.

Features:

(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))

Aaron

[-- Attachment #1.2: Type: text/html, Size: 5320 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2021-07-02 17:43 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-12  6:07 bug#22993: 25.0.92; OS X app nap slows down tty emacsclient Aaron Jensen
2016-03-12  8:03 ` bug#22993: Potential fix/workaround for 22993 Aaron Jensen
2016-06-10 18:40   ` Alan Third
2016-06-11 15:51     ` Aaron Jensen
2016-06-11 16:19       ` Alan Third
2016-06-11 16:23         ` Aaron Jensen
2016-06-15 20:35   ` Alan Third
2016-06-16 13:47     ` Aaron Jensen
     [not found]     ` <57629b7f841b1a0000aa4164@polymail.io>
2016-07-03  9:19       ` Alan Third
2016-07-03 17:23         ` Aaron Jensen
2016-07-07 18:55           ` Alan Third
2016-07-07 19:08             ` Aaron Jensen
2016-07-07 19:09               ` Aaron Jensen
2016-07-07 19:57               ` Alan Third
2016-07-08  5:29                 ` Aaron Jensen
2016-07-10  9:53                   ` Alan Third
2016-07-10 15:38                     ` Aaron Jensen
2016-07-10 16:11                       ` Alan Third
2021-07-01 20:47     ` Alan Third
2021-07-02 17:43       ` Aaron Jensen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).