Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

Deduplicate stored protocols #68

Closed
whyrusleeping opened this issue Apr 14, 2019 · 1 comment · Fixed by #71
Closed

Deduplicate stored protocols #68

whyrusleeping opened this issue Apr 14, 2019 · 1 comment · Fixed by #71
Assignees

Comments

@whyrusleeping
Copy link
Contributor

We store every protocol that is supported by every peer we connect to. These protocols tend towards being long strings, and are common between pretty much every peer we connect to. Instead of storing these for each peer we connect to, we should probably map each string to an integer, and store those integers with each peer. This would reduce memory usage on my nodes by around 10% it looks like

@raulk
Copy link
Member

raulk commented Apr 14, 2019

Makes sense. Could you try switching to the datastore-backed peerstore in your setup? IPFS will soon have an experimental flag (ipfs/kubo#6080), and medium-term I’d like to make this implementation the default.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants