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

Look at using Arguments.defer #172

Open
wsargent opened this issue Jul 8, 2020 · 0 comments
Open

Look at using Arguments.defer #172

wsargent opened this issue Jul 8, 2020 · 0 comments

Comments

@wsargent
Copy link
Collaborator

wsargent commented Jul 8, 2020

From logfellow/logstash-logback-encoder#396

Arguments are resolved through

https://github.com/tersesystems/blindsight/blob/master/logstash/src/main/scala/com/tersesystems/blindsight/logstash/LogstashArgumentResolver.scala

but there is no defer in place and so the argument will be rendered (taking up memory) even if the statement never gets logged.

Lazy logging should be able to ameliorate this somewhat, and the defer itself does add a small amount of allocation in the wrapper... so maybe make this optional?

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

No branches or pull requests

1 participant