From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Greg Klanderman Newsgroups: gmane.emacs.devel Subject: slow X11 frame creation and refresh after occlusion (was: gnus-server-to-method crash on virtual server name in gnus-secondary-select-methods) Date: Tue, 26 Jan 2021 14:09:03 -0500 Message-ID: <87tur3ecs0.fsf_-_@lwm.klanderman.net> References: <24567.20346.37031.450073@lwm.klanderman.net> <87eeivwae3.fsf@ericabrahamsen.net> <874kjejezr.fsf@lwm.klanderman.net> <875z3p7stg.fsf@ericabrahamsen.net> <8735yogb1z.fsf@lwm.klanderman.net> <878s8gug2k.fsf@gmail.com> Reply-To: Greg Klanderman Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34332"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.4.24 (linux) Cc: Eric Abrahamsen , emacs-devel@gnu.org To: Robert Pluim Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 26 20:11:27 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l4TkM-0008mS-7x for ged-emacs-devel@m.gmane-mx.org; Tue, 26 Jan 2021 20:11:26 +0100 Original-Received: from localhost ([::1]:47730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4TkI-0004HK-Gw for ged-emacs-devel@m.gmane-mx.org; Tue, 26 Jan 2021 14:11:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60924) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4TiS-0003hX-Fo for emacs-devel@gnu.org; Tue, 26 Jan 2021 14:09:30 -0500 Original-Received: from so254-31.mailgun.net ([198.61.254.31]:51979) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l4TiM-0004Yp-Ew for emacs-devel@gnu.org; Tue, 26 Jan 2021 14:09:28 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=klanderman.net; q=dns/txt; s=mg; t=1611688160; h=Content-Type: MIME-Version: References: Message-ID: In-Reply-To: Date: Reply-To: Subject: Cc: To: From: Sender; bh=tUo1T9HST3tQYB2Qio5d0yVS5DIeix6F7akrvxbPvmw=; b=EWM/JSkqUanRQM7J1ODT5jWm1bobZWBXdGFXcHz8Uhd87o+EyuiQEnccdI2A2Rap6Huc5gdt oDqN/mEGf28gwFCm4Yy+Ca33tgTJLkIAPcPGnHnZIDgnKf0Lnrl9WHEcuBWNGeg3crBez6YY GGSf9BQ/D40u32HGRzYjIqYafkw= X-Mailgun-Sending-Ip: 198.61.254.31 X-Mailgun-Sid: WyI5OTUyZSIsICJlbWFjcy1kZXZlbEBnbnUub3JnIiwgIjk3ZGJkOCJd Original-Received: from smtp2.klanderman.net (smtp2.klanderman.net [142.93.10.110]) by smtp-out-n05.prod.us-east-1.postgun.com with SMTP id 601068d0beacd1a252c181a4 (version=TLS1.3, cipher=TLS_AES_128_GCM_SHA256); Tue, 26 Jan 2021 19:09:04 GMT Original-Received: from lwm.klanderman.net (pool-72-93-77-73.bstnma.fios.verizon.net [72.93.77.73]) by smtp2.klanderman.net (Postfix) with ESMTPSA id C89C5415EE; Tue, 26 Jan 2021 14:09:03 -0500 (EST) Original-Received: by lwm.klanderman.net (Postfix, from userid 1000) id 8F8EE29E2A49; Tue, 26 Jan 2021 14:09:03 -0500 (EST) In-Reply-To: <878s8gug2k.fsf@gmail.com> (Robert Pluim's message of "Tue, 26 Jan 2021 11:51:15 +0100") Received-SPF: pass client-ip=198.61.254.31; envelope-from=bounce+ffeceb.97dbd8-emacs-devel=gnu.org@klanderman.net; helo=so254-31.mailgun.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:263481 Archived-At: Hi Robert, Thank you for your response! >>>>> On January 26, 2021 Robert Pluim wrote: >>>>> On Mon, 25 Jan 2021 12:51:04 -0500, Greg Klanderman said: Greg> My biggest concern now with fully transitioning, other than a lot more Greg> time, is how slow it is over ssh forwarded X11. As I said xemacs is Greg> perfectly snappy, but Emacs is taking sometimes 30-60+ sec just to Greg> create a new frame. > Does the attached patch improve frame creation? Let me get back to you.. I did clone the git repository last week but have not gotten around to building yet.. I did just look and find the building guide so hopefully get to that in the next couple days.. But IIUC the patch removes one of two XOpenDisplay() calls, so at best would halve the latency in opening a new frame, so I can't see it completely solving the problem. Also, shouldn't the opening of the display only take place for the first frame on that display? Greg> I turned off tooltips which seemed to be causing much of the latency Greg> issues, then it seemed that toolbars & menubars were the issue because Greg> after dragging another window over an Emacs frame, everything would Greg> redraw immediately but the menubars and toolbars, which could again Greg> take 30-60+ seconds with Emacs being essentially frozen to input. Greg> Switching gtk to lucid (Debian testing) did not make appreciable Greg> difference. Greg> I've now noticed that the problem only occurs when a frame of Greg> an Emacs is dragged over another frame of the same Emacs, so I suspect Greg> some problem with the event handling loop. I will submit a bug Greg> report; this is perfectly reproducible with emacs -Q after ssh'ing Greg> from my work laptop (on home network) to my work desktop (in office Greg> 30mi away) and then back to my personal home desktop, even with Greg> tooltips/tool bars/menu bars/scroll bars off. > Which X server are you using? I don?t see this at all (but admittedly > the two machines in question are a meter apart) Yeah I do not see it between my work laptop and home desktop plugged into the same switch (I am working fully remote, from home). Displaying from my work desktop (in office 30 mi away) to work laptop on my home network it is very obvious, and even more so displaying from my home desktop via work desktop and back onto my work laptop (again, on my home network). My home desktop is running Debian testing, and the work laptop and desktop are running Debian testing with work's patches applied. Generally I am running in "old-school" mode, without a desktop environment, using fvwm2 2.6.9 + a few local patches, started via startx from a terminal login. I will check if I see the issue using the default desktop environment (I think cinnamon is standard on the work laptop).. and get back to you on that as well. X server is whatever is default on Debian testing, let me know if there is some command you want me to run to determine any specific details.. thanks, Greg > diff --git a/src/xterm.c b/src/xterm.c > index 2e0407aff4..448e06eb8b 100644 > --- a/src/xterm.c > +++ b/src/xterm.c > @@ -12709,8 +12709,6 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) > ++x_initialized; > } > - if (! x_display_ok (SSDATA (display_name))) > - error ("Display %s can't be opened", SSDATA (display_name)); > #ifdef USE_GTK > { > @@ -12838,6 +12836,7 @@ #define NUM_ARGV 10 > /* Detect failure. */ > if (dpy == 0) > { > + error ("Display %s can't be opened", SSDATA (display_name)); > unblock_input (); > return 0; > }