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

chore: Optimize Logging by Replacing f-Strings with Lazy Evaluation #309

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kaulson
Copy link

@kaulson kaulson commented Jun 4, 2024

PR type

Refactor, enhancement

Description

This PR aims to enable lazy evaluation of the log messages.
I've replaced the f-strings inside the logger calls by printf-style string formatting to potentially improve performance a bit. I'm not sure if this is desired here, hence I only applied it for the rolling_window.py that I was reading through.

For further reference see the pylint docs on this issue.

…trings to improve performance through lazy evaluation
@jamescalam jamescalam changed the title Optimize Logging by Replacing f-Strings with Lazy Evaluation chore: Optimize Logging by Replacing f-Strings with Lazy Evaluation Jun 6, 2024
@jamescalam
Copy link
Member

hey @kaulson this is great, we were not aware of this — do you want to add the same enhancements elsewhere?

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

Successfully merging this pull request may close these issues.

None yet

2 participants