bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#23864: 25.1.50; Poor network responsivenes using open-network-stream


From: Glenn Morris
Subject: bug#23864: 25.1.50; Poor network responsivenes using open-network-stream
Date: Wed, 29 Jun 2016 21:50:47 -0400
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Christer Ekholm wrote:

> 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


I see this is in emacs-25, so perhaps should be fixed there.


> And, The attached patch fixes it for me
>
>>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
>
> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]