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

Debug log inspection performance penalty #142

Open
hazardfn opened this issue Jul 16, 2020 · 0 comments
Open

Debug log inspection performance penalty #142

hazardfn opened this issue Jul 16, 2020 · 0 comments

Comments

@hazardfn
Copy link

hazardfn commented Jul 16, 2020

It seems that even when the log level is set to :warn or :info the inspections made in debug logs are still executed despite not being used, this is because a straight string is passed to the Logger instead of anonymous functions (at least in the tracker).

See: https://elixirforum.com/t/use-of-inspect-in-log-messages/2100/7

A significant amount of reductions were seen in our app and many calls to printable? from within Swarm.Tracker we suspect this is the cause as large structures are inspected as part of the debug messages.

Ideally anonymous functions should be passed to Logger in all instances so disabled log levels don't incur a penalty when inspecting structures for printing.

@hazardfn hazardfn changed the title Debug log inspections still handled Debug log inspection performance penalty Jul 16, 2020
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