Skip to content

[ipfs/go-bitswap] Improve (CPU) performance when rebroadcasting wants #113

@Stebalien

Description

@Stebalien

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/enhancementA net-new feature or improvement to an existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions