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(bitswap): performance improvements #634

Merged
merged 5 commits into from
Jul 2, 2024

Conversation

gammazero
Copy link
Contributor

@gammazero gammazero commented Jul 1, 2024

  • Create fewer copies of wantlist.
  • Fewer iterations of wantlist when processing received message.

These changes make some minor improvements and separate these from functional changes in other PR(s).

(lidel) likely closes #625 closes #626

- Create fewer copies of wantlist.
- Fewer iterations of wantlist when processing received message.

These changes make some minor improvements and separates these from functional changes in other PR(s).
@gammazero gammazero requested a review from a team as a code owner July 1, 2024 21:07
Copy link

codecov bot commented Jul 1, 2024

Codecov Report

Attention: Patch coverage is 96.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 59.84%. Comparing base (dfd4a53) to head (b9f9a75).

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #634      +/-   ##
==========================================
+ Coverage   59.79%   59.84%   +0.04%     
==========================================
  Files         238      238              
  Lines       29984    29976       -8     
==========================================
+ Hits        17930    17939       +9     
+ Misses      10434    10424      -10     
+ Partials     1620     1613       -7     
Files Coverage Δ
bitswap/message/message.go 83.87% <100.00%> (+2.86%) ⬆️
bitswap/server/internal/decision/engine.go 90.90% <95.00%> (-0.32%) ⬇️

... and 11 files with indirect coverage changes

@lidel lidel changed the title Chore/performance improvements refactor: performance improvements Jul 2, 2024
@lidel lidel changed the title refactor: performance improvements refactor(bitswap): performance improvements Jul 2, 2024
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

lgtm, thank you (also likely helps with flaky tests #625 #626)

@lidel lidel merged commit 733fa55 into main Jul 2, 2024
18 checks passed
@lidel lidel deleted the chore/performance-improvements branch July 2, 2024 18:58
wenyue pushed a commit to wenyue/boxo that referenced this pull request Oct 17, 2024
* Minor performance improvements around wantlist handling

- Create fewer copies of wantlist.
- Fewer iterations of wantlist when processing received message.

These changes make some minor improvements
and separates these from functional changes in other PR(s).

* Do not try to process empty emssages
* Do not let splitWants modify entries list argument, but pass in message instead
* increase timeouts to fix flaky tests
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.

flaky test: TestCancelOverridesPendingWants flaky test: TestSendingLargeMessages
2 participants