[issue46740] Improve Telnetlib's throughput

2022-02-20 Thread Martin Kirchgessner


Change by Martin Kirchgessner :


--
keywords: +patch
pull_requests: +29577
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/31449

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46740] Improve Telnetlib's throughput

2022-02-18 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Even if deprecated, it will be around for at least 2 versions.  A patch now 
might be worthwhile, but I don't know who would review it.

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46740] Improve Telnetlib's throughput

2022-02-13 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

Note that telnetlib is being proposed for deprecation in PEP 594. You may be 
better off using a third-party telnet implementation; the PEP lists 
https://pypi.org/project/telnetlib3/ and https://pypi.org/project/Exscript/.

--
nosy: +Jelle Zijlstra

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46740] Improve Telnetlib's throughput

2022-02-13 Thread Martin Kirchgessner


New submission from Martin Kirchgessner :

While using `telnetlib` I sometimes received unusually "large" messages (around 
1Mb) from another process on the same machine, and was surprised `read_until` 
took more than a second. After instrumenting I discovered such messages were 
received at roughly 500kbyte/s.

I think this low throughput comes from two implementation details:

 - `Telnet.fill_rawq` is calling `self.sock.recv(50)`, whereas 4096 is now 
recommended
 - the `Telnet.process_rawq` method is transferring from raw queue to cooked 
queue by appending byte per byte.

For the latter, transferring by slices looks much faster (I'm measuring at 
least 5x). I'm preparing a PR.

--
components: Library (Lib)
messages: 413195
nosy: martin_kirch
priority: normal
severity: normal
status: open
title: Improve Telnetlib's throughput
type: resource usage
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com