-
Notifications
You must be signed in to change notification settings - Fork 11.6k
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
Perf: Reduce memory overhead in transitive dependency #78651
Conversation
19fce78
to
0cdd5ca
Compare
/deploy-to-hg |
|
|
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! |
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! |
What is this feature?
Reduces
go_memstats_heap_inuse_bytes
from ~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-json
is a dependency of Apache Arrow v13. Grafana does not currently use Arrow's JSON encoding/decoding, but Arrow's import ofgo-json
is 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: