-
Notifications
You must be signed in to change notification settings - Fork 112
Slowness from prepareWantHaves #392
Comments
Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
Finally, remember to use https://discuss.ipfs.io if you just need general support. |
This is inside of filecoin, where pretty much every peer has every single object. So i imagine hundreds of peers are going to have the objects in question. Additionally, it looks like we're making this whole map just to iterate over it in the caller. Maybe we can avoid these allocations somehow? |
We were seeing some issues with that code path on the IPFS gateways. Do you have a pprof dump? |
@whyrusleeping points out that we may be able to avoid a bunch of allocations by modifying |
Make sure you're using sessions. |
haha gave him that tip already :) |
I'm seeing 'BroadcastWantHaves' from the peer manager showing up in profiles, spending time iterating maps inside of prepareBroadcastWantHaves. We can probably optimize this a bit
The text was updated successfully, but these errors were encountered: