Perf: Reduce memory overhead in transitive dependency#78651
Closed
toddtreece wants to merge 2 commits intomainfrom
Closed
Perf: Reduce memory overhead in transitive dependency#78651toddtreece wants to merge 2 commits intomainfrom
toddtreece wants to merge 2 commits intomainfrom
Conversation
19fce78 to
0cdd5ca
Compare
Member
Author
|
/deploy-to-hg |
|
|
Contributor
|
This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 2 weeks if no further activity occurs. Please feel free to give a status update or ping for review. Thank you for your contributions! |
Contributor
|
This pull request has been automatically closed because it has not had any further activity in the last 2 weeks. Thank you for your contributions! |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this feature?
Reduces
go_memstats_heap_inuse_bytesfrom ~65MB to ~45MB on a mostly idle (except profiling) Grafana instance, by switching to lazy initialization of global variables ingo-json.Related PR: goccy/go-json#490
Why do we need this feature?
go-jsonis a dependency of Apache Arrow v13. Grafana does not currently use Arrow's JSON encoding/decoding, but Arrow's import ofgo-jsonis adding additional memory overhead due to how some global variables are initialized.This is pretty easy to spot when looking at Pyroscope flamegraphs:

Who is this feature for?
[Add information on what kind of user the feature is for.]
Which issue(s) does this PR fix?:
Fixes #
Special notes for your reviewer:
Please check that: