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

fix: bitswap performance issue #692

Merged
merged 5 commits into from
Oct 18, 2024
Merged

fix: bitswap performance issue #692

merged 5 commits into from
Oct 18, 2024

Conversation

gammazero
Copy link
Contributor

@gammazero gammazero commented Oct 17, 2024

  • Fix exhausted wants problem resulting in possible performance issue
  • Minor improvements for GC and execution

@gammazero gammazero requested a review from a team as a code owner October 17, 2024 20:41
@gammazero gammazero changed the title fix: performance issue fix: bitswap performance issue Oct 17, 2024
Copy link

codecov bot commented Oct 17, 2024

Codecov Report

Attention: Patch coverage is 74.07407% with 7 lines in your changes missing coverage. Please review.

Project coverage is 60.35%. Comparing base (043c71c) to head (048f932).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
bitswap/client/internal/session/sessionwants.go 57.14% 2 Missing and 1 partial ⚠️
...wap/client/internal/peermanager/peerwantmanager.go 80.00% 1 Missing ⚠️
...wap/client/internal/session/peerresponsetracker.go 50.00% 1 Missing ⚠️
...tswap/client/internal/session/sessionwantsender.go 66.66% 0 Missing and 1 partial ⚠️
...p/client/internal/sessionmanager/sessionmanager.go 66.66% 1 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #692      +/-   ##
==========================================
+ Coverage   60.28%   60.35%   +0.07%     
==========================================
  Files         242      243       +1     
  Lines       31019    31034      +15     
==========================================
+ Hits        18699    18730      +31     
+ Misses      10647    10636      -11     
+ Partials     1673     1668       -5     
Files with missing lines Coverage Δ
...tswap/client/internal/messagequeue/messagequeue.go 84.92% <100.00%> (ø)
...wap/client/internal/notifications/notifications.go 87.35% <100.00%> (+0.29%) ⬆️
bitswap/client/internal/peermanager/peermanager.go 91.72% <ø> (ø)
...wap/client/internal/peermanager/peerwantmanager.go 88.50% <80.00%> (+0.16%) ⬆️
...wap/client/internal/session/peerresponsetracker.go 96.15% <50.00%> (+3.05%) ⬆️
...tswap/client/internal/session/sessionwantsender.go 95.74% <66.66%> (-0.50%) ⬇️
...p/client/internal/sessionmanager/sessionmanager.go 95.78% <66.66%> (ø)
bitswap/client/internal/session/sessionwants.go 88.99% <57.14%> (-2.44%) ⬇️

... and 11 files with indirect coverage changes

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.

b2554a00b246 looked ok at rainbow staging (staging-2024-10-18-73ff85c):
https://www.notion.so/boxo-690-bitswap-s-live-wantlist-fix-1221def3428780148536c7cca992a07a

Just needs changelog + landing #690 first.

@gammazero gammazero merged commit 19bcc75 into main Oct 18, 2024
15 checks passed
@gammazero gammazero deleted the chore/bitswap-client-perf branch October 18, 2024 18:44
gammazero added a commit that referenced this pull request Oct 22, 2024
- Fix exhausted wants problem resulting in possible performance issue
- Minor improvements for GC.
- RWLock not justified for time reading
- replace unneeded RWMutex with Mutex
- build strings with strings.Builder

(cherry picked from commit 19bcc75)
@gammazero gammazero mentioned this pull request Oct 22, 2024
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.

2 participants