-
Notifications
You must be signed in to change notification settings - Fork 48
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
Improve performance #83
Conversation
There were issues with shutting down in our tests & benchmarks. It seems I finally got to the bottom of those:
now we don't need the timeout anymore |
Upgraded benchmarks are currently running locally:
Where one block is |
Latest commit improves the benchmark to
|
One thing that we should do is make things like peerId.toB58String() become a cached property of the PeerId class itself, this way, instead of forcing the developer (in bitswap us, but for any app on top too) to remember to cache it always, V8 will start inlining every peerId.toB58String() as soon as the first time it is called. To save even more time, just make the PeerId class immutable all the way and cache all of these: |
@diasdavid funny you mention that: libp2p/js-peer-id#44 😝 |
@dignifiedquire PR's everywhere \o/ ! :D |
Closing in favor of #84 |
Includes #82