Title: Freeze encodings module during startup · Issue #161941 · python/cpython · GitHub
Open Graph Title: Freeze encodings module during startup · Issue #161941 · python/cpython
X Title: Freeze encodings module during startup · Issue #161941 · python/cpython
Description: 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 encoding...
Open Graph Description: 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 be...
X Description: 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 be...
Opengraph URL: https://github.com/python/cpython/issues/161941
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Freeze encodings module during startup","articleBody":"### Feature or enhancement\n\nFreezing modules improves startup performance (#145278). The encodings module was unfozen in #156183, but with some additional checks we can freeze the module again.\n\nQuick benchmark on Windows:\n\n| | main | frozen `encodings` |\n|---|---|---|\n| `python -I -S -c pass` | 25.6 ms | 22.3 ms |\n| `python -c pass` | 32.1 ms | 28.4 ms |\n| `-X importtime`, `encodings` cumulative | 3.2 ms | 0.9 ms |\n\nPR upcoming\n\n\n### Has this already been discussed elsewhere?\n\nNo response given\n\n### Links to previous discussion of this feature:\n\n_No response_\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-161951\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/eendebakpt","@type":"Person","name":"eendebakpt"},"datePublished":"2026-11-13T15:15:46Z","url":"https://github.com/python/cpython/issues/161941"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:09c55e26-62a5-b50f-25a3-d91bd01f1767 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8AF6:F8C5C:85EBB1:A87CC9:6B020AD9 |
| html-safe-nonce | 370ab4b57ed4189405e01bbfdf6ab1ea4f8d9fcde046a5d0279f338b1716b65e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QUY2OkY4QzVDOjg1RUJCMTpBODdDQzk6NkIwMjBBRDkiLCJ2aXNpdG9yX2lkIjoiODgzMTAxNTczMzc5OTU1Mzc1NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 73ddf9406e02e6ec67567efa25d2fea7e119ad94421c0d26dea1ae6e47789b0d |
| hovercard-subject-tag | issue:6374219958 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/161941/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7a61790548acf4e13e644ff7912c367258c5145718594874f9a9cbf38f596cd1/python/cpython/issues/161941 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7a61790548acf4e13e644ff7912c367258c5145718594874f9a9cbf38f596cd1/python/cpython/issues/161941 |
| og:image:alt | 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 be... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | eendebakpt |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width