Skip to content

Conversation

@yeya24
Copy link
Contributor

@yeya24 yeya24 commented Oct 23, 2025

What this PR does:

Same as cortexproject/weaveworks-common#8, change metadata.FromIncomingContext to use metadata.ValueFromIncomingContext instead to improve allocation.

metadata.FromIncomingContext is 17% of objects allocated on Ingester from our profile. Changing it to metadata.ValueFromIncomingContext should help with allocation to relieve GC.

image

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@SungJin1212
Copy link
Member

Thanks!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 24, 2025
@yeya24 yeya24 merged commit fc6da2d into cortexproject:master Oct 29, 2025
32 of 34 checks passed
@yeya24 yeya24 deleted the improve-allocation branch October 29, 2025 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size/L type/performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants