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

refactor(core-p2p): refactor codecs so buffer isn't re-allocated 400 times. #4493

Merged

Conversation

rainydio
Copy link
Contributor

@rainydio rainydio commented Sep 16, 2021

Summary

That buffers.reduce allocated new buffer on each iteration.

Checklist

  • Ready to be merged

@codecov-commenter
Copy link

codecov-commenter commented Sep 16, 2021

Codecov Report

Merging #4493 (0cbaa4a) into develop (51539e1) will decrease coverage by 0.01%.
The diff coverage is 36.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #4493      +/-   ##
===========================================
- Coverage    95.59%   95.57%   -0.02%     
===========================================
  Files          687      687              
  Lines        17487    17492       +5     
  Branches      2140     2141       +1     
===========================================
+ Hits         16716    16718       +2     
- Misses         565      568       +3     
  Partials       206      206              
Flag Coverage Δ
functional 6.01% <0.00%> (-0.01%) ⬇️
integration 10.00% <0.00%> (-0.01%) ⬇️
unit 94.10% <36.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ckages/core-p2p/src/socket-server/codecs/blocks.ts 12.76% <0.00%> (-0.57%) ⬇️
.../core-p2p/src/socket-server/codecs/transactions.ts 82.60% <75.00%> (-2.40%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 51539e1...0cbaa4a. Read the comment docs.

@rainydio rainydio changed the title refactor(core-p2p): refactor getBlocks so buffer isn't re-allocated 400 times. refactor(core-p2p): refactor codecs so buffer isn't re-allocated 400 times. Sep 16, 2021
@rainydio rainydio marked this pull request as ready for review September 16, 2021 09:18
@sebastijankuzner sebastijankuzner merged commit b7f62ef into develop Sep 16, 2021
@sebastijankuzner sebastijankuzner deleted the refactor/core-p2p/get-blocks-buffer-re-allocating branch September 16, 2021 12:00
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