]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-105623 Fix performance degradation in logging RotatingFileHandler (GH-10588...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 28 Jun 2024 09:23:38 +0000 (11:23 +0200)
committerGitHub <noreply@github.com>
Fri, 28 Jun 2024 09:23:38 +0000 (09:23 +0000)
commite310d2bd71b72ad050e20a3da30636e0970a6fc2
tree3d53a45bd0580eb76d86a8bf0ba26990bf5a8c56
parentd5441f6aacc1eab69ad539445568a2ef779cb267
[3.13] gh-105623 Fix performance degradation in logging RotatingFileHandler (GH-105887) (GH-121117)

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 e9b4ec614b66d11623b80471409c16a109f888d5)

Co-authored-by: Craig Robson <craig@zhatt.com>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Lib/logging/handlers.py
Misc/NEWS.d/next/Library/2023-06-17-09-07-06.gh-issue-105623.5G06od.rst [new file with mode: 0644]