Yury Selivanov <yseliva...@gmail.com> added the comment: > See https://eklitzke.org/goroutines-nonblocking-io-and-memory-usage for an > interesting discussion of the drawbacks of some buffer handling idioms.
Thanks for the link! It does make sense to use a pool of buffers for the proposed BufferedProtocol when you need to keep thousands of long-open connections. The current design makes that easy: when BufferedProtocol.get_buffer() is called you either take a buffer from the pool or allocate a temporary new one. For use-cases like DB connections (asyncpg) a permanently allocated buffer per protocol instance is a good solution too, as usually there's a fairly limited number of open DB connections. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32251> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com