all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ken Raeburn <raeburn@permabit.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, 11822@debbugs.gnu.org
Subject: bug#11822: 24.1; emacsclient terminal mode captures escape characters as text
Date: Wed, 23 Sep 2015 13:27:26 -0400	[thread overview]
Message-ID: <CAJJWxE-+=ijd95-WkwOBO6g3V4wWCiNWdXSNpQCDFAS+yn42tw@mail.gmail.com> (raw)
In-Reply-To: <838u80nm2e.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 3624 bytes --]

So far my testing is going smoothly. (Well, except for some unrelated
issues like the desktop save file format changing and making it hard to go
back to the older version.) And as far as I can tell, creating a new frame
on the local display at work is not doing anything that stops to wait for
communication with the remote display. It's much faster now.

It's still not what I would call "fast", though, usually taking a couple of
seconds... but a cursory investigation is so far pointing the finger at
garbage collection being triggered during frame creation, more often than
not. If I raise gc-cons-threshold by a factor of 10, frame creation and
display is fairly quick (presumably only 90-95% of the time). The C stack
traces from the garbage collection calls are pretty boring (maybe_gc gets
called from Ffuncall which gets called from exec_byte_code etc); the Lisp
backtraces point the finger mostly at internal-face-x-get-resource as the
function being entered when GC gets invoked.

Lisp Backtrace:
"internal-face-x-get-resource" (0x1910fb80)
"set-face-attribute-from-resource" (0x1910fd80)
"set-face-attributes-from-resources" (0x1910ff80)
"make-face-x-resource-internal" (0x19110170)
"face-spec-recalc" (0x19110360)
"face-set-after-frame-default" (0x19110560)
"x-create-frame-with-faces" (0x19110758)
0x121eac8 PVEC_COMPILED
"apply" (0x19110a10)
"frame-creation-function" (0x19110c10)
"make-frame" (0x19110dc0)
"make-frame-on-display" (0x19110f88)
"server-create-window-system-frame" (0x191111b8)
"server-process-filter" (0x19111398)

A memory profile report of frame creation via emacsclient includes this
breakdown:

- server-process-filter                                     2,898,676   2%
 - server-create-window-system-frame                        1,526,354   1%
  - make-frame-on-display                                   1,522,279   1%
   - make-frame                                             1,522,279   1%
    - frame-creation-function                               1,509,219   1%
     - apply                                                1,509,219   1%
      - #<compiled 0x487ab3>                                1,509,219   1%
       - x-create-frame-with-faces                          1,509,219   1%
        - face-set-after-frame-default                        372,148   0%
         - face-spec-recalc                                   371,868   0%
          - make-face-x-resource-internal                     368,460   0%
             set-face-attributes-from-resources               368,460   0%
          + face-spec-choose                                    2,384   0%
          + face-spec-set-2                                     1,024   0%
      normal-erase-is-backspace-setup-frame                    13,036   0%
    + run-hook-with-args                                           24   0%
    window-system-for-display                                   1,024   0%
 - server-execute-continuation                              1,355,452   1%
  - #<compiled 0x175dd37>                                   1,355,452   1%
   - server-execute                                         1,349,604   1%
      switch-to-buffer                                      1,269,569   1%
    + server-delete-client                                     36,910   0%

However, I'm skeptical of the numbers since the report also indicated that
read-from-minibuffer (but not things it called) used 100M (bytes? cells?)
in those few seconds. (Hence the >2MB shown here being such a tiny
percentage.) And the numbers vary a lot from one attempt to another, though
the proportions seem to be fairly consistent.

Ken

[-- Attachment #2: Type: text/html, Size: 4770 bytes --]

  reply	other threads:[~2015-09-23 17:27 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-30  0:08 bug#11822: 24.1; emacsclient terminal mode captures escape characters as text Ken Raeburn
2012-06-30  5:55 ` Eli Zaretskii
2012-07-31 21:06   ` Ken Raeburn
2012-08-08  3:13     ` Ken Raeburn
2012-08-08  4:52       ` Dan Nicolaescu
2012-08-08  9:26         ` Ken Raeburn
2012-08-09 21:12           ` Ken Raeburn
2012-08-10  6:16             ` Eli Zaretskii
2012-08-10  7:27               ` Ken Raeburn
2012-08-10  7:46                 ` Eli Zaretskii
2012-08-10  8:08                   ` Eli Zaretskii
2015-09-07 21:09                     ` Ken Raeburn
2015-09-08  1:29                       ` Stefan Monnier
2015-09-08  4:29                         ` Eli Zaretskii
2015-09-08  6:53                         ` Ken Raeburn
2015-09-08 13:03                           ` Stefan Monnier
2015-09-08 13:11                           ` Stefan Monnier
2015-09-08 17:21                             ` Eli Zaretskii
2015-09-08  4:48                       ` Eli Zaretskii
2015-09-08 10:15                         ` Ken Raeburn
2015-09-08 13:35                           ` Stefan Monnier
2015-09-08 17:33                           ` Eli Zaretskii
2015-09-08 19:54                             ` Ken Raeburn
2015-09-09 14:16                               ` Eli Zaretskii
2015-09-10  6:59                                 ` Ken Raeburn
2015-09-10 15:36                                   ` Eli Zaretskii
2015-09-10 17:56                                     ` Stefan Monnier
2015-09-10 18:06                                       ` Eli Zaretskii
2015-09-11 12:56                                         ` Stefan Monnier
2015-09-11 13:53                                           ` Eli Zaretskii
2015-09-11 16:53                                             ` Stefan Monnier
2015-09-11  6:54                                     ` Ken Raeburn
2015-09-11  7:22                                       ` Eli Zaretskii
2015-09-11 23:11                                         ` Ken Raeburn
2015-09-12  0:51                                           ` Stefan Monnier
2015-09-12  1:34                                             ` Ken Raeburn
2015-09-15 14:29                                             ` Eli Zaretskii
2015-09-15 16:14                                               ` Stefan Monnier
2015-09-18 14:19                                                 ` Eli Zaretskii
2015-09-21  9:23                                                   ` Ken Raeburn
2015-09-21  9:44                                                     ` Eli Zaretskii
2015-09-23 17:27                                                       ` Ken Raeburn [this message]
2015-09-23 18:04                                                         ` martin rudalics
2015-09-23 20:59                                                           ` Ken Raeburn
2015-09-23 19:17                                                         ` Eli Zaretskii
2015-09-24  8:52                                                           ` Ken Raeburn
2015-09-24 18:46                                                             ` Eli Zaretskii
2015-09-24 20:08                                                               ` Ken Raeburn
2015-09-25  6:49                                                                 ` Eli Zaretskii
2015-09-25 12:07                                                                   ` Stefan Monnier
2015-09-26  7:01                                                                   ` Eli Zaretskii
2015-09-25  6:50                                                             ` Eli Zaretskii
2015-09-25 12:09                                                               ` Stefan Monnier
2015-09-25 13:29                                                                 ` Eli Zaretskii
2015-09-25 15:18                                                                   ` Stefan Monnier
2015-09-12  7:30                                           ` Eli Zaretskii
2015-09-11 13:39                                       ` Stefan Monnier
2015-09-11 14:01                                         ` Eli Zaretskii
2015-09-08 13:22                         ` Stefan Monnier
2015-09-08 17:25                           ` Eli Zaretskii
2015-09-08 18:52                             ` Stefan Monnier
2015-09-08 19:08                               ` Eli Zaretskii
2015-09-08 20:37                                 ` Stefan Monnier
2015-09-08 17:36                         ` Eli Zaretskii

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

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

  git send-email \
    --in-reply-to='CAJJWxE-+=ijd95-WkwOBO6g3V4wWCiNWdXSNpQCDFAS+yn42tw@mail.gmail.com' \
    --to=raeburn@permabit.com \
    --cc=11822@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.