unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Gregor Zattler <grfz@gmx.de>
To: 17648@debbugs.gnu.org
Subject: bug#17648: 24.4.50; regression: emacsclient under screen (1) slow for some values of TERM
Date: Sat, 31 May 2014 02:18:00 +0200	[thread overview]
Message-ID: <877g526bt3.fsf@boo.workgroup> (raw)

Dear emacs developers,

under screen with emacs from repo

emacsclient -t <some-filename>

almost instantaneously shows the scratch buffer (or some other
last used buffer), then for 2 secs nothing happens, then the
window shows the buffer which corresponds to some-file-name and
one is able to work with it.

This happens for some values of TERM.


recipe:

emacs-snapshot -Q --daemon

now do

/usr/bin/time screen -m -c /dev/null  -T $TERMINALNAME  sh -c "emacsclient.emacs-snapshot -n -t /tmp/emacsslow/AA${RANDOM}${RANDOM}BB ; emacsclient.emacs-snapshot --eval '(server-edit)'"

for different values of TERMINALNAME

Here is a sorted list of elapsed times for terminfo definitions
from my debian testing system (the elapsed times in this list are
the median of 11 rounds with each terminfo definiton):

0:00.05elapsed screen2
0:00.05elapsed screen3
0:00.05elapsed screen.Eterm
0:00.05elapsed screen.gnome
0:00.05elapsed screen.konsole
0:00.05elapsed screen.linux
0:00.05elapsed screen.mlterm
0:00.05elapsed screen.mrxvt
0:00.05elapsed screen.rxvt
0:00.05elapsed screen.teraterm
0:00.05elapsed screen.vte
0:00.05elapsed screen.xterm-new
0:00.05elapsed screen.xterm-r6

some of them are *much* slower:
0:02.06elapsed screen-16color
0:02.07elapsed screen-16color-bce
0:02.07elapsed screen-16color-s
0:02.07elapsed screen-bce.Eterm
0:02.07elapsed screen-bce.gnome
0:02.07elapsed screen-bce.konsole
0:02.07elapsed screen-bce.linux
0:02.07elapsed screen-bce.mlterm
0:02.07elapsed screen-bce.mrxvt
0:02.07elapsed screen-bce.rxvt
0:02.08elapsed screen-256color-s
0:02.09elapsed screen-256c-bce-s --> screen-256color-bce-s

Sadly I use the last one, which is a link to the actual terminfo
file since screen (1) does not accept TERM values with a length
of more then 20 characters.

I did the same timing tests with emacs24 as packaged for debian
testing:

0:00.02elapsed screen3
0:00.02elapsed screen.mrxvt
0:00.03elapsed screen-16color
0:00.03elapsed screen-16color-bce
0:00.03elapsed screen-16color-s
0:00.03elapsed screen2
0:00.03elapsed screen-bce.Eterm
0:00.03elapsed screen-bce.gnome
0:00.03elapsed screen-bce.konsole
0:00.03elapsed screen-bce.linux
0:00.03elapsed screen-bce.mlterm
0:00.03elapsed screen-bce.mrxvt
0:00.03elapsed screen-bce.rxvt
0:00.03elapsed screen.gnome
0:00.03elapsed screen.konsole
0:00.03elapsed screen.linux
0:00.03elapsed screen.mlterm
0:00.03elapsed screen.rxvt
0:00.03elapsed screen.teraterm
0:00.03elapsed screen.vte
0:00.03elapsed screen.xterm-new
0:00.04elapsed screen-256c-bce-s
0:00.04elapsed screen-256color-s
0:00.04elapsed screen.xterm-r6
0:00.10elapsed screen.Eterm

There is no such 2 secs delay.

I did a git bisect on the repo and this produced:

6607a79c6e7c7554059557c0db78c26c57314f24 is the first bad commit
commit 6607a79c6e7c7554059557c0db78c26c57314f24
Author: Daniel Colascione <dancol@dancol.org>
Date:   Thu Apr 17 00:54:23 2014 -0700

    2014-04-17  Daniel Colascione  <dancol@dancol.org>

        Add support for bracketed paste mode; add infrastructure for
        managing terminal mode enabling and disabling automatically.

        * xt-mouse.el:
        (xterm-mouse-mode): Simplify.
        (xterm-mouse-tracking-enable-sequence)
        (xterm-mouse-tracking-disable-sequence): New constants.
        (turn-on-xterm-mouse-tracking-on-terminal)
        (turn-off-xterm-mouse-tracking-on-terminal): Use
        tty-mode-set-strings and tty-mode-reset-strings terminal
        parameters instead of random hooks.
        (turn-on-xterm-mouse-tracking)
        (turn-off-xterm-mouse-tracking): Delete.

        * term/xterm.el (xterm-extra-capabilities): Fix bitrotted comment.
        (xterm-paste-ending-sequence): New constant.
        (xterm-paste): New command used for bracketed paste support.

        (xterm-modify-other-keys-terminal-list): Delete obsolete variable.
        (terminal-init-xterm-bracketed-paste-mode): New function.
        (terminal-init-xterm): Call it.
        (terminal-init-xterm-modify-other-keys): Use tty-mode-set-strings
        and tty-mode-reset-strings instead of random hooks.
        (xterm-turn-on-modify-other-keys)
        (xterm-turn-off-modify-other-keys)
        (xterm-remove-modify-other-keys): Delete obsolete functions.

        * term/screen.el: Rewrite to just use the xterm code.  Add
        copyright notice.  Mention tmux.

:040000 040000 35e7957f61e4d66ebd209cd1c4e866a28d4b2530 ab84f10010ef069579268a06a8cb87297a99222f M      doc
:040000 040000 6e356fc3442cded91abe85539d87c010a5b55b74 97ed2cb729e1981da13e3087f31ca1d889d207f5 M      etc
:040000 040000 1f0fa9c7b097af1630c809920c763294996bc9e1 e2cb31100399d2a62f34c29014f588c097033f8d M      lisp
:040000 040000 502e344d50623e95ecd35483334810ab76f9f5da f2e77d45d90ad1964f395e75cbd318ee01e4b7a3 M      src
bisect run success


0 grfz@boo:~/src/emacs$ git bisect log
git bisect start
# bad: [70ae6e9f3ca829e4a22290a8f2434343e2f0e127] * admin/notes/changelogs: Mention `quoting'.
git bisect bad 70ae6e9f3ca829e4a22290a8f2434343e2f0e127
# good: [87cc4be37367f4039a1fb6bda8ba681bb279475f] Bump version to 24.3.91
git bisect good 87cc4be37367f4039a1fb6bda8ba681bb279475f
# bad: [83e103c61b9d775709624a44e7ed5b20ba44847d] Improve Scheme font-locking for (define ((foo ...) ...) ...).
git bisect bad 83e103c61b9d775709624a44e7ed5b20ba44847d
# good: [5910501252ec0067857e36c1d73e7b522d83b861] * emacs-lisp/eldoc.el (eldoc-print-current-symbol-info): Refactor out eldoc-documentation-function-default.
(eldoc-documentation-function-default): New function. (eldoc-documentation-function): Change value.
git bisect good 5910501252ec0067857e36c1d73e7b522d83b861
# good: [f0f301dd19212bf133aacd7fd592e126958309d8] Merge from emacs-24; up to r116940
git bisect good f0f301dd19212bf133aacd7fd592e126958309d8
# bad: [069e400fbf7d0e404438a922c9f5839b1d4902da] Tweak documentation for previous change
git bisect bad 069e400fbf7d0e404438a922c9f5839b1d4902da
# good: [6f100a7a58857ce2838a11eec596073837ba7858] Remove DATA_SEG_BITS.
git bisect good 6f100a7a58857ce2838a11eec596073837ba7858
# good: [085874f070af05df7a80b8e10cb5f88696bd685e] * GNUmakefile: Speed up 'make bootstrap' in fresh checkout.
git bisect good 085874f070af05df7a80b8e10cb5f88696bd685e
# bad: [ed507155bec59e1dd1844b4593d75aec1906b594] Merge from emacs-24; up to r116982
git bisect bad ed507155bec59e1dd1844b4593d75aec1906b594
# bad: [5c1915d10b3716879785fe49f5cfe20beeb37090] * term.c (tty_send_additional_strings): No need to fflush here,
git bisect bad 5c1915d10b3716879785fe49f5cfe20beeb37090
# bad: [6607a79c6e7c7554059557c0db78c26c57314f24] 2014-04-17  Daniel Colascione  <dancol@dancol.org>
git bisect bad 6607a79c6e7c7554059557c0db78c26c57314f24
# first bad commit: [6607a79c6e7c7554059557c0db78c26c57314f24] 2014-04-17  Daniel Colascione  <dancol@dancol.org>




I have no idea if or how this is related to the problem at hand,
but screen.el was changed, therefore I hope this info helps.

I wished, emacsclient would open files be fast again.


I would be happy to answer questions or do some testing
if someone provides me with instruction.

Thanks for your attention, Gregor





             reply	other threads:[~2014-05-31  0:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-31  0:18 Gregor Zattler [this message]
2014-06-01  1:23 ` bug#17648: 24.4.50; regression: emacsclient under screen (1) slow for some values of TERM Stefan Monnier
2014-06-01  1:25   ` Daniel Colascione
2014-06-01  1:26     ` Daniel Colascione
2014-06-01  1:52       ` Stefan Monnier
2014-06-01  9:03       ` Gregor Zattler
2014-06-01  8:51   ` Gregor Zattler
2014-06-17 14:07     ` Stefan Monnier
2014-06-17 15:17       ` Jim Meyering
2014-06-17 16:21         ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877g526bt3.fsf@boo.workgroup \
    --to=grfz@gmx.de \
    --cc=17648@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).