mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
2.4 KiB
2.4 KiB
TODO
aquatic
- Use bounded request channel?
- Handle Ipv4 and Ipv6 peers. Probably split state. Ipv4 peers can't make use of Ipv6 ones. Ipv6 ones may or may note be able to make use of Ipv4 ones, have to check.
- More tests
aquatic_bench
- Fix issues since switch to socket and handler workers, removal of dashmap
- Iterate over whole returned buffer and run e.g. xor on it (.iter().fold())
- Generic bench function since current functions are almost identical
- Show percentile stats for peers per torrent
bittorrent_udp
- Tests with good known byte sequences
Not important
aquatic
- No overflow on instant + duration arithmetic now, hopefully?
- extract_response_peers
- Cleaner code
- Stack-allocated vector?
- Use log crate for errors, including logging thread names? I could probably use code from old rs_news project for that.
- Performance
- cpu-target=native good?
- mialloc good?
- Use less bytes from PeerId for hashing? (If yes, only save half of them or so in PeerMapKey). Might improve performance, but probably not worth it.
aquatic_bench
- num_rounds command line argument
- Send in connect reponse ids to other functions as integration test
- Save last results, check if difference is significant?
- ProgressBar:
[{elapsed_precise}]and eta_precise? - Test server over udp socket instead?
bittorrent_udp
- Avoid heap allocation in general if it can be avoided?
- request from bytes for scrape: use arrayvec with some max size for torrents? With Vec, allocation takes quite a bit of CPU time
- Optimize bytes to scrape request: Vec::with_capacity or other solution (SmallVec?)
Don't do
aquatic
- Other HashMap hashers (such as SeaHash): seemingly not worthwhile (might be with AVX though)
sendmmsg: can't send to multiple socket addresses, so doesn't help- Config behind Arc in state: it is likely better to be able to pass it around without state
- Responses: make vecors iteretor references so we dont have run .collect(). Doesn't work since it means conversion to bytes must be done while holding readable reference to entry in torrent map, hurting concurrency.
bittorrent_udp
- Use
bytescrate for bittorrent_udp: seems to worsen performance somewhat - Zerocopy (https://docs.rs/zerocopy/0.3.0/zerocopy/index.html) for requests and responses? Doesn't work on Vec etc
- New array buffer each time in response_to_bytes: doesn't help performance