-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-96159: Fix significant performance degradation in logging.TimedRotat… (GH-96182) #96182
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
Conversation
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
…otatingFileHandler due to fix to python#89564 Only check for special files when the rollover time has passed, rather than cheking on every log message.
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
GH-96195 is a backport of this pull request to the 3.10 branch. |
…medRotat… (pythonGH-96182) (cherry picked from commit 1499d73) Co-authored-by: Duncan Grisby <[email protected]>
…medRotat… (pythonGH-96182) (cherry picked from commit 1499d73) Co-authored-by: Duncan Grisby <[email protected]>
GH-96196 is a backport of this pull request to the 3.11 branch. |
…imedRotat… (GH-96182) (GH-96195) Co-authored-by: Duncan Grisby <[email protected]>
…imedRotat… (GH-96182) (GH-96196) Co-authored-by: Duncan Grisby <[email protected]>
This is a simple fix for #96159. The cost of checking for non-regular files is now only incurred when the rollover time is reached, rather than on every single log message.
A similar change could be made to RotatingFileHandler, but does seek() and tell() calls on the file, which are probably bad to do on special files, so I thought it was safer to leave it with the file type check on every call.