Skip to content

log/slog: reduce allocs on Any value handling #6

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

austinderek
Copy link

This reduces allocations for handling Any values by reusing the JSON Encoder and using fmt.Fprint instead of fmt.Sprint for value formatting.

Fixes golang#74645


🔄 This is a mirror of upstream PR #74646

It reduce allocs of Any values handling by reusing the JSON Encoder and
using `fmt.Fprint` instead of `fmt.Sprint` for value formatting.

Solves: golang#74645
@austinderek austinderek force-pushed the master branch 29 times, most recently from 121e5bb to 7a1679d Compare August 5, 2025 07:04
@austinderek austinderek force-pushed the master branch 30 times, most recently from b266318 to d50240b Compare August 13, 2025 03:26
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