emacs-devel
[Top][All Lists]
Advanced

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

Re: Is it possible to change the recv buffer size dynamically for networ


From: Eli Zaretskii
Subject: Re: Is it possible to change the recv buffer size dynamically for network process or subprocess?
Date: Sat, 04 Apr 2020 15:55:05 +0300

> Date: Sat, 4 Apr 2020 20:17:10 +0800
> From: HaiJun Zhang <address@hidden>
> Cc: address@hidden, address@hidden, address@hidden
> 
> One of my use case:
> I plan to hack lsp-mode to limit the bandwidth and the message size.
> 
> When I use lsp-mode for dart language, It happened that 10000 lines were sent 
> to emacs for one completion
> which cause emacs unresponsive for several seconds.
> 
> When I use lsp-mode for go language, It happened that 400 messages were sent 
> to emacs during one
> second which cause emacs unresponsive for a while.

Emacs becomes unresponsive in these cases because it processes the
stuff that arrives in its entirety, not because it receives it.  The
code which processes the received stuff can easily stop after some
amount has been processed, and leave the rest for the next cycle.

IOW, it is better to modify the process filter than make the receive
buffer smaller.



reply via email to

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