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

Skip unnecessary json.Unmarshal in converter #933

Merged
merged 3 commits into from
Aug 9, 2024

Conversation

SpencerTorres
Copy link
Collaborator

An optimization when loading object/array-like types dependent on jsonConverter. We can skip this marshal+unmarshal combo and simply marshal it and cast the result to the required json.RawMessage.

Looks like this was added to convert []byte to json.RawMessage, but both types are already []byte so we can simply cast it.

Changes:

  • optimized jsonConverter
  • updated changelog

@SpencerTorres SpencerTorres requested a review from a team as a code owner August 8, 2024 02:47
@aangelisc
Copy link
Contributor

@SpencerTorres this just needs main merged and then it's good to go 😊

@aangelisc
Copy link
Contributor

Thanks @SpencerTorres!

@aangelisc aangelisc merged commit 5c3bf22 into grafana:main Aug 9, 2024
16 checks passed
@SpencerTorres SpencerTorres deleted the fix-log-json branch August 17, 2024 00:06
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