Combine i2psnark sender threads
Opened 8 years ago
Last modified 5 years ago
#1067openenhancement
Combine i2psnark sender threads
Reported by:zzzOwned by:zzz Priority: minor Milestone:
Component: apps/i2psnark Version: 0.9.8.1 Keywords: performance Cc:
Parent Tickets:
Sensitive: no
Description
Snark currently has two threads per connection - Snark reader aka PeerConnectionIn?, and Snark sender aka PeerConnectionOut?.
It seems like the PeerConnectionOut? threads could be combined to a "pumper" model where it loops through the connections round-robin and only pushes a message if it would not block in streaming. The trick is making sure it wouldn't block.
Centralizing output in a per-torrent pumper would also lay the groundwork for better outbound bandwidth management.