← 输入框|github.com|刷新
Skip to content

Freeze encodings module during startup #161941

Open

Description

@eendebakpt

Feature or enhancement

Freezing modules improves startup performance (#145278). The encodings module was unfozen in #156183, but with some additional checks we can freeze the module again.

Quick benchmark on Windows:

main frozen encodings
python -I -S -c pass 25.6 ms 22.3 ms
python -c pass 32.1 ms 28.4 ms
-X importtime, encodings cumulative 3.2 ms 0.9 ms

PR upcoming

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs

Activity

  1. added
    type-feature
    performance
    on Nov 13, 2026
  2. added
    interpreter-core
    on Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-coreperformancetype-feature

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions