Skip to content
This repository was archived by the owner on Feb 1, 2023. It is now read-only.
This repository was archived by the owner on Feb 1, 2023. It is now read-only.

Avoid keeping blocks in memory longer than we need to #173

@Stebalien

Description

@Stebalien

When we get a block, we currently send it to every interested session (SessionManager.ReceiveBlocksFrom). Looking into this, we mostly just need the CID. That would:

  1. Save us some memory (sometimes).
  2. Avoid keeping blocks we didn't ask for around. We currently do this to track duplicates but I'd rather toss them ASAP.

We still need the blocks themselves to send them to the user but we should be able to avoid that by removing the per-session PubSub instance and reverting to a global PubSub instance.

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