Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support object peerid format in difference util #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vinkabuki
Copy link

@vinkabuki vinkabuki commented Feb 19, 2023

Hi,

After upgrading to new libp2p (0.40) we noticed that we have serious performance problems (battery drain on mobile). We've found out that we're using new PeerId format in which we have objects instead of strings, I think it has occurred across multiple packages in orbitdb too, where conversion id to string was the solution, but this issue is not critical and I suppose others also experience this after migrating to new libp2p and ipfs but they are not aware, however it affects performance, because _onPeerConnected and exchangeHeads is called on every emitJoinAndLeaves tick, so the app is getting really busy.

This is the behavior I see:

new values Set(1) { PeerId(Qmaec9tu8vWtY89W3PY4sh2wAoSV2b7jdmooVtSqaAb6PW) } old values Set(1) { PeerId(Qmaec9tu8vWtY89W3PY4sh2wAoSV2b7jdmooVtSqaAb6PW) } difference Set(1) { PeerId(Qmaec9tu8vWtY89W3PY4sh2wAoSV2b7jdmooVtSqaAb6PW) }

After few small changes I made:

new values Set(1) { PeerId(Qmaec9tu8vWtY89W3PY4sh2wAoSV2b7jdmooVtSqaAb6PW) } old values Set(1) { PeerId(Qmaec9tu8vWtY89W3PY4sh2wAoSV2b7jdmooVtSqaAb6PW) } difference Set(0) {}

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

Successfully merging this pull request may close these issues.

1 participant