From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Christer Ekholm Newsgroups: gmane.emacs.bugs Subject: bug#23864: 25.1.50; Poor network responsivenes using open-network-stream Date: Tue, 28 Jun 2016 21:24:49 +0200 Message-ID: <22386.52993.297791.550073@ender.chrekh.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="RcaabHh/jx" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1467143812 22751 80.91.229.3 (28 Jun 2016 19:56:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Jun 2016 19:56:52 +0000 (UTC) To: 23864@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 28 21:56:41 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bHz7d-0000Bo-2M for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Jun 2016 21:56:37 +0200 Original-Received: from localhost ([::1]:39328 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHz7X-0004Cv-5x for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Jun 2016 15:56:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50902) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHz76-0003x4-KF for bug-gnu-emacs@gnu.org; Tue, 28 Jun 2016 15:56:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHz74-0001Hx-96 for bug-gnu-emacs@gnu.org; Tue, 28 Jun 2016 15:56:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47039) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHz74-0001Ht-5Y for bug-gnu-emacs@gnu.org; Tue, 28 Jun 2016 15:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bHz74-00074V-1U for bug-gnu-emacs@gnu.org; Tue, 28 Jun 2016 15:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Christer Ekholm Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Jun 2016 19:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 23864 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.146714370727091 (code B ref -1); Tue, 28 Jun 2016 19:56:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Jun 2016 19:55:07 +0000 Original-Received: from localhost ([127.0.0.1]:59376 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bHz6B-00072t-69 for submit@debbugs.gnu.org; Tue, 28 Jun 2016 15:55:07 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58973) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bHz4X-0006z6-9q for submit@debbugs.gnu.org; Tue, 28 Jun 2016 15:53:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHz4Q-0000KX-Ju for submit@debbugs.gnu.org; Tue, 28 Jun 2016 15:53:20 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:40290) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHz4Q-0000KR-Gp for submit@debbugs.gnu.org; Tue, 28 Jun 2016 15:53:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHz4N-0001Z4-SE for bug-gnu-emacs@gnu.org; Tue, 28 Jun 2016 15:53:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHz4M-0000K7-Hx for bug-gnu-emacs@gnu.org; Tue, 28 Jun 2016 15:53:15 -0400 Original-Received: from chrekh-1-pt.tunnel.tserv24.sto1.ipv6.he.net ([2001:470:27:125::2]:52606 helo=ender.chrekh.se) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHz4M-0000Jd-6Z for bug-gnu-emacs@gnu.org; Tue, 28 Jun 2016 15:53:14 -0400 Original-Received: by ender.chrekh.se (Postfix, from userid 1001) id 4CF9A3179; Tue, 28 Jun 2016 21:24:49 +0200 (CEST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Tue, 28 Jun 2016 15:55:05 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:120185 Archived-At: --RcaabHh/jx Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit 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 --RcaabHh/jx Content-Type: text/plain; name="0001-Fix-condition-for-return-from-waiting-for-process-ou.patch" Content-Description: [PATCH] Fix condition for return from waiting for process output. Content-Disposition: inline; filename="0001-Fix-condition-for-return-from-waiting-for-process-ou.patch" Content-Transfer-Encoding: 7bit >From ce0d739141770f885527a9f1a2db8ff79599ae11 Mon Sep 17 00:00:00 2001 From: Christer Ekholm 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 --RcaabHh/jx Content-Type: text/plain; charset=us-ascii Content-Description: message body and .signature Content-Transfer-Encoding: 7bit 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 --RcaabHh/jx--