Subject: Re: bug#78773: [PATCH] Speedup url-retrieve-synchronously for low-latency connections

From: Steven Allen <[email-masked]>
Date: Fri, 13 Jun 2025 08:14:41 -0700

Robert Pluim <[email-masked]> writes:

>>>>>> On Fri, 13 Jun 2025 07:50:59 -0700, Steven Allen <[email-masked]> said:
>
>     Steven> I think this patch will cause us to the final drain loop when waiting on
>     Steven> a single connection. It's probably fine, but I assume this drain loop
>     Steven> existed for a reason?
>
>     Steven>   https://cgit.git.savannah.gnu.org/cgit/emacs.git/tree/src/process.c?h=bec823b107ef7d3b51b8e430ccab82c81bd63d24#n5525
>
> It will, but weʼll already have read from the process at line 5972 or
> thereabouts.
>
> Since I canʼt definitively say it wonʼt break anything, we should go
> with the minimal patch, ie yours.

Your approach is correct, I think. It just may be less performant as the
user will now need to accept output twice when we could have just
"finished the job" the first time around.