Title: bpo-45020: Freeze some of the modules imported during startup. by ericsnowcurrently · Pull Request #28335 · python/cpython · GitHub
Open Graph Title: bpo-45020: Freeze some of the modules imported during startup. by ericsnowcurrently · Pull Request #28335 · python/cpython
X Title: bpo-45020: Freeze some of the modules imported during startup. by ericsnowcurrently · Pull Request #28335 · python/cpython
Description: Doing this provides significant performance gains for runtime startup (~15% with all the imported modules frozen). We don't yet freeze all the imported modules because there are a few hiccups in the build systems we need to sort out first. (See bpo-45186 and bpo-45188.) Note that in PR GH-28320 we added a command-line flag (-X frozen_modules=[on|off]) that allows users to opt out of (or into) using frozen modules. The default is still "off" but we will change it to "on" as soon as we can do it in a way that does not cause contributors pain. FYI, most of this PR was already reviewed in #28107. Also, almost all the changes in this PR are generated code (not generated: Tools/scripts/freeze_modules.py and Lib/test/*.py). Here are things we'll be doing in follow-up PRs: always default to "on" if it's a PGO build, even if under development freeze the remaining stdlib modules imported during startup (os, site, codecs, encodings.*) default to "on" (except if actually running out of the source tree) stop tracking the frozen module .h files in the repo possibly freeze other modules (e.g. those imported for "python -m ...", AKA runpy) possibly make frozen stdlib modules more like source modules, with __file__ and __path__ (see bpo-21736) https://bugs.python.org/issue45020
Open Graph Description: Doing this provides significant performance gains for runtime startup (~15% with all the imported modules frozen). We don't yet freeze all the imported modules because there are a few hiccups ...
X Description: Doing this provides significant performance gains for runtime startup (~15% with all the imported modules frozen). We don't yet freeze all the imported modules because there are a few hicc...
Opengraph URL: https://github.com/python/cpython/pull/28335
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:545740fb-bfe8-d5a0-81b1-19cbcc679229 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | A67C:36419E:37C51D:48900E:696ADD8D |
| html-safe-nonce | 3b38c74c0beaac291ce55bb8d999cd43a52769323651adf4f4be3ca138f15988 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNjdDOjM2NDE5RTozN0M1MUQ6NDg5MDBFOjY5NkFERDhEIiwidmlzaXRvcl9pZCI6IjUwMzQyNzU1OTE5ODA1MDY1MDkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | df6b79baab0c1578148eeca7b1bf9e71ef0196cea1c1bec109025a705ac38c3d |
| hovercard-subject-tag | pull_request:733827159 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,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/python/cpython/pull/28335/checks |
| twitter:image | https://avatars.githubusercontent.com/u/1152074?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1152074?s=400&v=4 |
| og:image:alt | Doing this provides significant performance gains for runtime startup (~15% with all the imported modules frozen). We don't yet freeze all the imported modules because there are a few hiccups ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| 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 full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 524a93f2c1f36522a3b4be4c110467ee4172245d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width