]> Sergey Matveev's repositories - public-inbox.git/commit
nntp: introduce long response API for streaming
authorEric Wong <e@80x24.org>
Sat, 19 Sep 2015 02:03:30 +0000 (02:03 +0000)
committerEric Wong <e@80x24.org>
Sat, 19 Sep 2015 04:18:37 +0000 (04:18 +0000)
commit0d0fde0bff97a283e3b433f2772a99fe9d6d8412
tree5ea275e787362cbb2d666b37722edb58d7683c39
parentc6e35192bf5aa6b195e210674f9a30d189ab7457
nntp: introduce long response API for streaming

XOVER, NEWNEWS, XHDR responses may be arbitrarily long and cause
memory usage via buffering.  This problem would exist even if we
were to optimize them by caching headers for fast retrieval and
search.

Introduce a generic API to handle all of these commands fairly
without triggering excessive buffering and unfairness of the
existing implementation.

Generating these responses is still expensive for now, but at least
the implementation is fair to other clients and prevents one client
from using one of these commands to monopolize resources away from
other clients.
lib/PublicInbox/NNTP.pm