http: avoid heap allocation for torrents with few peers; refactor

This commit is contained in:
Joakim Frostegård 2024-01-27 10:58:03 +01:00
parent 91f5289b2b
commit 352194e0bd
5 changed files with 322 additions and 192 deletions

View file

@ -47,6 +47,8 @@
* Index peers by packet source IP and provided port instead of by source ip
and peer id. This is likely slightly faster.
* Avoid a heap allocation for torrents with four or less peers. This can save
a lot of memory if many torrents are tracked
* Improve announce performance by avoiding having to filter response peers
* In announce response statistics, don't include announcing peer