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: Excessive GC CPU pressure caused by unwanted heap memory #281 #284

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

nithu1991
Copy link
Contributor

Description

Fix Excessive GC Pressure due,

payload := make([]byte, 2)

p.payload = append(payload, p.payload[:len(p.payload)-paddingLength]...)

Reference issue

Fixes #281

@Sean-Der
Copy link
Member

Fantastic, thank you so much @nithu1991

Copy link

codecov bot commented Oct 28, 2024

Codecov Report

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

Project coverage is 71.13%. Comparing base (d34a3c5) to head (94457ee).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
internal/rtpbuffer/packet_factory.go 83.33% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #284      +/-   ##
==========================================
- Coverage   72.87%   71.13%   -1.74%     
==========================================
  Files          80       80              
  Lines        3679     4476     +797     
==========================================
+ Hits         2681     3184     +503     
- Misses        865     1157     +292     
- Partials      133      135       +2     
Flag Coverage Δ
go 71.13% <83.33%> (-1.63%) ⬇️
wasm 69.14% <83.33%> (-1.34%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

NACK storage would use a sync.Pool to reduce memory pressure. The new
distinict SSRC feature did not properly use this pool. This change
updates the RTPBuffer to use it for both paths.

Fixes pion#281
@Sean-Der
Copy link
Member

I have invited you and your co-worker @nithu1991. I am excited to see what else you can improve :)

@Sean-Der Sean-Der merged commit 82bca40 into pion:master Oct 28, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Excessive GC CPU pressure caused by unwanted heap memory
2 participants