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

feat: cache b58 id #44

Merged
merged 2 commits into from
Dec 18, 2016
Merged

feat: cache b58 id #44

merged 2 commits into from
Dec 18, 2016

Conversation

dignifiedquire
Copy link
Member

While investigating slow performance in js-ipfs I discovered that there are too many calls to mh.toB58String. This is the start of reducing the number of those calls.

@victorb
Copy link
Member

victorb commented Dec 14, 2016

On a (maybe) related note, I had troubles with slow transfers between chrome and chrome, others work fine. ipfs/js-ipfs#611

@@ -17,11 +17,16 @@ class PeerId {
assert(privKey.public.bytes.equals(pubKey.bytes), 'inconsistent arguments')
}

this.id = id
this._id = id
this._idB58String = ''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do this on creation :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, also throwing now on id mutation

@daviddias daviddias merged commit f0d72b7 into master Dec 18, 2016
@daviddias daviddias deleted the feat/cache branch December 18, 2016 08:05
@daviddias daviddias removed the status/in-progress In progress label Dec 18, 2016
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.

3 participants