-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Unexpected memory usage #851
Comments
From a quick glance, this seems reasonable. Can you send a PR, and ensure the race detector doesn't find any issues once the above change is made. Thanks! |
wyxloading
pushed a commit
to wyxloading/zap
that referenced
this issue
Jul 28, 2020
consoleEncoder clone a jsonEncoder in `writeContext`, but never put back to pool after use. This make zap do more memory allocations, and may increase gc time.
wyxloading
pushed a commit
to wyxloading/zap
that referenced
this issue
Jul 28, 2020
consoleEncoder clone a jsonEncoder in `writeContext`, but never put back to pool after use. This make zap do more memory allocations, and may increase gc time.
wyxloading
added a commit
to wyxloading/zap
that referenced
this issue
Jul 28, 2020
consoleEncoder clone a jsonEncoder in `writeContext`, but never put back to pool after use. This make zap do more memory allocations, and may increase gc time.
I would like to send PR for this (FYI, PR link #852) |
#852 was merged so we can resolve this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here cloned a
jsonEncoder
(which actually get from_jsonPool
), but never put back to_jsonPool
after use.zap/zapcore/console_encoder.go
Lines 131 to 145 in 53a3870
Perhaps we need something like below to decrease memory allocations.
The text was updated successfully, but these errors were encountered: