From: Greg Klanderman <gak@klanderman.net>
To: Robert Pluim <rpluim@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: slow X11 frame creation and refresh after occlusion
Date: Fri, 05 Feb 2021 12:12:07 -0500 [thread overview]
Message-ID: <874kiq4exk.fsf@lwm.klanderman.net> (raw)
In-Reply-To: <875z36suvk.fsf@gmail.com> (Robert Pluim's message of "Fri, 05 Feb 2021 10:53:51 +0100")
>>>>> On February 5, 2021 Robert Pluim <rpluim@gmail.com> wrote:
>>>>> On Thu, 04 Feb 2021 16:14:48 -0500, Greg Klanderman <gak@klanderman.net> said:
>>>>> On February 4, 2021 Robert Pluim <rpluim@gmail.com> wrote:
>>>>> On Wed, 03 Feb 2021 16:52:15 -0500, Greg Klanderman <gak@klanderman.net> said:
>>>>> On February 1, 2021 Robert Pluim <rpluim@gmail.com> wrote:
Greg> (frame-parameter nil 'font-backend)
Greg> (xfthb x)
Greg> any suggestions for settings I can try?
>>>>> Configure '--with-cairo'. I'm hoping that will be more efficient in
>>>>> terms of loading fonts.
Greg> OK I will have a look. Is there any way to determine if font loading
Greg> is causing significant delay? And would that be an issue on
Greg> subsequent to the first frame on a display?
>>> Emacs does a bunch of font-related stuff every time you create a new
>>> graphical frame. You could try running emacs under 'perf' to see if it
>>> gives any insight.
Greg> OK I built from git, --with-cairo (interestingly configure does not
Greg> fail if you specify --with-cairo but don't have the libraries
Greg> installed) and am able to reproduce the issues I was seeing.
> It?s an option, which means cairo is...optional :-)
Oh, I thought that when you explicitly had a --with-FOO option, it
made it required...
> (I can?t think offhand of an emacs configure option that causes
> configure to fail if it?s not satisfied. Someone will now point one
> out).
I had one that was behaving like that, --with-sound=alsa I think.
I realize that's a little different than a boolean option though.
Greg> It looks like xterm.c has most of the X event handling, so maybe I
Greg> will try to put in some debug prints to see what's going on, or try
Greg> one of the X event tracing programs, or 'perf' next..
> Good luck. You might want to experiment with
> emacs -xrm "emacs.synchronous: true"
> That would make tracing stuff predictably easier.
OK I will try that resource.
So far I managed to build xtruss and get it working after recursively
debugging a crash where it didn't detect an error opening DISPLAY :10
(which an ssh session already had open). Thankfully strace quickly
showed the problem and I was able to patch it.
So I have two X event traces for emacs, one under fvwn where it has
the problem and one under cinnamon DE that does not, but have not
gotten far into trying to analyze the differences. After collecting
the cinnamon DE trace, my laptop wedged and I had to reboot it, it
sometimes does that when VT switching.
But maybe I should re-do with synchronous=true first..
Anyway just based on size there is a significant difference:
% wc -l /tmp/xtruss.emacs.*
45442 /tmp/xtruss.emacs.bad
7625 /tmp/xtruss.emacs.good
53067 total
Both consist of running emacs, moving the frame aside (so second frame
will not be on top), then C-x 5 2, waiting for emacs to be responsive,
then dragging the new frame over the first then leaving it off to the
side, and waiting for emacs to be responsive to input again. The
final step taking 30-60 sec in the bad case.
Will update if I find anything.
Greg
next prev parent reply other threads:[~2021-02-05 17:12 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-07 18:14 gnus-server-to-method crash on virtual server name in gnus-secondary-select-methods Greg Klanderman
2021-01-08 18:28 ` Eric Abrahamsen
2021-01-18 18:07 ` Greg Klanderman
2021-01-21 23:50 ` Eric Abrahamsen
2021-01-25 17:51 ` Greg Klanderman
2021-01-25 18:41 ` Eric Abrahamsen
2021-01-26 19:11 ` Greg Klanderman
2021-01-26 10:51 ` Robert Pluim
2021-01-26 19:09 ` slow X11 frame creation and refresh after occlusion (was: gnus-server-to-method crash on virtual server name in gnus-secondary-select-methods) Greg Klanderman
2021-01-27 8:07 ` slow X11 frame creation and refresh after occlusion Robert Pluim
2021-01-30 19:32 ` Greg Klanderman
2021-02-01 8:56 ` Robert Pluim
2021-02-03 21:52 ` Greg Klanderman
2021-02-04 8:24 ` Robert Pluim
2021-02-04 21:14 ` Greg Klanderman
2021-02-05 9:53 ` Robert Pluim
2021-02-05 17:12 ` Greg Klanderman [this message]
2021-01-30 22:21 ` Greg Klanderman
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=874kiq4exk.fsf@lwm.klanderman.net \
--to=gak@klanderman.net \
--cc=emacs-devel@gnu.org \
--cc=rpluim@gmail.com \
/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).