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

Appearance settings

Lazily import traceback in logging #150072

Copy link
Copy link
@ByteFlowing1337

Description

@ByteFlowing1337
Issue body actions

Feature or enhancement

Proposal:

Currently, Lib/logging/__init__.py and Lib/logging/config.py eagerly import traceback, despite it only being used during exception handling. Making this import lazy avoids unnecessary startup overhead and improves initial loading time.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs

Before 41msImage After 28ms(~31% faster)Image
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    performancePerformance or resource usagePerformance or resource usagestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-lazy-importstype-featureA feature request or enhancementA feature request or enhancement
    No fields configured for issues without a type.

    Projects

    Status
    No status
    Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.