[ipfs/go-bitswap] Improve (CPU) performance when rebroadcasting wants
Open
kind/enhancement
- Dominant language
- Go
- Stars
- 316
- Forks
- 163
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 8
Description
When we can't find anything for a while, we add all outstanding wants to a "broadcast" wantlist. Unfortunately, we _repeatedly_ do this. Fortunately, we don't re-send "want" messages but repeatedly adding all idle wants to every peer's wantlist incurs a high CPU cost.
We've partially fixed this in ipfs/go-bitswap#133 by doing this less frequently but we can do better.
1. If it's already in the broadcast wantlist, don't bother "sending" the message.
2. Only add _new_ idle wants? Extra state we need to track but may be worth it.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.