Skip to content

Conversation

@dbeneker
Copy link
Contributor

While debugging a performance-critical gRPC stream, I noticed that the logging reporter creates logging fields for every sent and received message, even when the LoggableEvent options PayloadReceived and PayloadSent are not set.
This unnecessary field creation increases garbage collection pressure and negatively impacts throughput.

Changes

Added an early return in the PostMsgSend() and PostMsgReceive() to skip building logging fields when payload logging is disabled.

Verification

Verified with existing unit tests.

Copy link
Collaborator

@johanbrandhorst johanbrandhorst left a comment

Choose a reason for hiding this comment

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

Thanks, makes sense!

@johanbrandhorst johanbrandhorst merged commit 390bcef into grpc-ecosystem:main Nov 1, 2025
5 checks passed
@dbeneker
Copy link
Contributor Author

dbeneker commented Nov 4, 2025

Tanks for merging! I noticed that the latest release tag hasn’t been updated in quite a while. Could you create a new tag?

@johanbrandhorst
Copy link
Collaborator

Sure, done!

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