Skip to content

[3.12] gh-105623 Fix performance degradation in logging RotatingFileHandler (GH-105887) #121116

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

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jun 28, 2024

The check for whether the log file is a real file is expensive on NFS
filesystems. This commit reorders the rollover condition checking to
not do the file type check if the expected file size is less than the
rotation threshold.

(cherry picked from commit e9b4ec6)

Co-authored-by: Craig Robson [email protected]
Co-authored-by: Oleg Iarygin [email protected]

…ndler (pythonGH-105887)

The check for whether the log file is a real file is expensive on NFS
filesystems.  This commit reorders the rollover condition checking to
not do the file type check if the expected file size is less than the
rotation threshold.

(cherry picked from commit e9b4ec6)

Co-authored-by: Craig Robson <[email protected]>
Co-authored-by: Oleg Iarygin <[email protected]>
@miss-islington miss-islington requested a review from vsajip as a code owner June 28, 2024 08:52
@serhiy-storchaka serhiy-storchaka enabled auto-merge (squash) June 28, 2024 08:53
@serhiy-storchaka serhiy-storchaka merged commit 2a68ed9 into python:3.12 Jun 28, 2024
28 checks passed
@serhiy-storchaka
Copy link
Member

@SamyDgz, please stop spamming. Your votes for long-merged PRs do not bring any benefit and only clutter the logs and distract the core developers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants