emacs-devel
[Top][All Lists]
Advanced

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

Re: read-process-output-max (was: Emacs HTTP libraries)


From: Eli Zaretskii
Subject: Re: read-process-output-max (was: Emacs HTTP libraries)
Date: Wed, 31 Mar 2021 20:13:32 +0300

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: "T.V Raman" <raman@google.com>,  cpitclaudel@gmail.com,
>   emacs-devel@gnu.org
> Date: Wed, 31 Mar 2021 12:01:35 -0400
> 
> I understand there is a per-chunk overhead which pushes towards a higher
> value, but I'm not sure what factors are pushing towards smaller values.

Values larger that some threshold will cause us use malloc instead of
alloca, that's one reason to use smaller buffers for performance
reasons.

Another potential issue, in programs that display the arriving stuff
as it is received, is that showing the text in small chunks is
generally better (UX-wise) than blasting a 1MB chunk of text to the
screen in one go.

> The docstring seems to strongly recommend not to increase it, so
> I suspect there's a much stronger reason that "not be wasteful" in play.

The effect of the value was never studied in detail, and so the
optimal value could be different from the default.  The doc string
says what it says to prevent people from getting themselves into
trouble when they don't really need to change the value for their
application: after all, the default value was used for many years, and
should be considered safe enough.



reply via email to

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