Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Significant performance degradation in logging.TimedRotatingFileHandler due to fix to #89564 #96159

Closed
Assignees
vsajip
Labels
performancePerformance or resource usagestdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error
@dgrisby

Description

@dgrisby

The fix to#89564 was to add two file checks to the shouldRollover() method of logging.TimedRotatingFileHandler and RotatingFileHandler (see62a6677 )

This means that every single log call now does two stat() calls to the log file, which is quite expensive. If the log file is stored on NFS, those stat() calls becomeextremely expensive. In our application it caused a dramatic (and hard to diagnose) performance loss.

It would be better if shouldRollover() was reverted to its previous implementation, and the check for special files was moved into doRollover(). That would mean the cost of the additional checks was only incurred when there is a rollover to do.

Metadata

Metadata

Assignees

Labels

performancePerformance or resource usagestdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp