unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#23864: 25.1.50; Poor network responsivenes using open-network-stream
@ 2016-06-28 19:24 Christer Ekholm
  2016-06-30  1:50 ` Glenn Morris
  0 siblings, 1 reply; 12+ messages in thread
From: Christer Ekholm @ 2016-06-28 19:24 UTC (permalink / raw)
  To: 23864

[-- Attachment #1: message body text --]
[-- Type: text/plain, Size: 242 bytes --]

Hi,

I decided to test the next release, and observed that a elisp package
i'm using got very poor networ responsivenes.

I have bisected to commit
 ad236260 Avoid duplicate calls to current_timespec

And, The attached patch fixes it for me


[-- Attachment #2: [PATCH] Fix condition for return from waiting for process output. --]
[-- Type: text/plain, Size: 1244 bytes --]

From ce0d739141770f885527a9f1a2db8ff79599ae11 Mon Sep 17 00:00:00 2001
From: Christer Ekholm <che@chrekh.se>
Date: Sun, 26 Jun 2016 01:53:42 +0200
Subject: [PATCH] Fix condition for return from waiting for process output.

* src/process.c (wait_reading_process_output): Move the test for
process output to outside setting of cmp_time, so that we don't miss
to exit if we have output, but got_output_end_time is not valid.
---
 src/process.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/process.c b/src/process.c
index ed0c529..23e2c52 100644
--- a/src/process.c
+++ b/src/process.c
@@ -5271,12 +5271,13 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
              timers.  */
 	  if (wait < TIMEOUT)
 	    break;
+	  if (!process_skipped && got_some_output > 0
+	      && (!timespec_valid_p (got_output_end_time)
+		  || (timeout.tv_sec > 0 || timeout.tv_nsec > 0)))
+	    break;
 	  struct timespec cmp_time
 	    = (wait == TIMEOUT
 	       ? end_time
-	       : (!process_skipped && got_some_output > 0
-		  && (timeout.tv_sec > 0 || timeout.tv_nsec > 0))
-	       ? got_output_end_time
 	       : invalid_timespec ());
 	  if (timespec_valid_p (cmp_time))
 	    {
-- 
2.9.0


[-- Attachment #3: message body and .signature --]
[-- Type: text/plain, Size: 3838 bytes --]



In GNU Emacs 25.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.20.6)
 of 2016-06-28 built on jane
Repository revision: 2adc4ccd03d24660bcf7f8ff056c7f32b92b584d
Windowing system distributor 'The X.Org Foundation', version 11.0.11803000
System Description:	Gentoo Base System release 2.2

Configured using:
 'configure --prefix=/usr --build=x86_64-pc-linux-gnu
 --host=x86_64-pc-linux-gnu --mandir=/usr/share/man
 --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
 --localstatedir=/var/lib --disable-dependency-tracking
 --disable-silent-rules --docdir=/usr/share/doc/emacs-vcs-25.1.9999-r1
 --htmldir=/usr/share/doc/emacs-vcs-25.1.9999-r1/html
 --libdir=/usr/lib64 --program-suffix=-emacs-25-vcs
 --infodir=/usr/share/info/emacs-25-vcs --localstatedir=/var
 --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp
 --with-gameuser=:gamestat --without-compress-install
 --with-file-notification=inotify --disable-acl --with-dbus
 --without-gpm --without-hesiod --without-kerberos --without-kerberos5
 --with-xml2 --without-selinux --with-gnutls --without-wide-int
 --with-zlib --with-sound=alsa --with-x --without-ns --without-gconf
 --without-gsettings --with-toolkit-scroll-bars --with-gif --with-jpeg
 --with-png --with-rsvg --without-tiff --with-xpm --with-imagemagick
 --without-xft --without-cairo --without-libotf --without-m17n-flt
 --with-x-toolkit=gtk3 --without-xwidgets
 GENTOO_PACKAGE=app-editors/emacs-vcs-25.1.9999-r1'

Configured features:
XPM JPEG GIF PNG RSVG IMAGEMAGICK SOUND DBUS NOTIFY GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
  value of $LC_MESSAGES: C
  value of $LANG: sv_SE.utf8
  locale-coding-system: utf-8-unix

Major mode: Info

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
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(misearch multi-isearch jka-compr info pp shadow sort mail-extr emacsbug
message puny seq byte-opt gv bytecomp byte-compile cl-extra help-mode
cconv cl-loaddefs pcase cl-lib dired dired-loaddefs format-spec rfc822
mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util
rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils site-gentoo w3m-load time-date mule-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/x-win x-win term/common-win x-dnd 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 term/tty-colors 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 obarray 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 dbusbind inotify
dynamic-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 132582 36234)
 (symbols 48 21171 6)
 (miscs 40 121 488)
 (strings 32 24668 10672)
 (string-bytes 1 782873)
 (vectors 16 14829)
 (vector-slots 8 461770 9460)
 (floats 8 188 429)
 (intervals 56 5222 1)
 (buffers 976 15)
 (heap 1024 46495 2574))

-- 
 Christer

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

end of thread, other threads:[~2016-07-05 23:10 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-28 19:24 bug#23864: 25.1.50; Poor network responsivenes using open-network-stream Christer Ekholm
2016-06-30  1:50 ` Glenn Morris
2016-07-03  9:01   ` Paul Eggert
2016-07-03 11:21     ` Christer Ekholm
2016-07-03 15:21       ` Eli Zaretskii
2016-07-03 18:54         ` Christer Ekholm
2016-07-03 22:51           ` Paul Eggert
2016-07-04  7:34             ` Christer Ekholm
2016-07-04 14:35             ` Eli Zaretskii
2016-07-05 18:43               ` Paul Eggert
2016-07-05 19:46                 ` Eli Zaretskii
2016-07-05 23:10                   ` Paul Eggert

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