René's URL Explorer Experiment


Title: gh-118761: Optimise import time for ``string`` by AA-Turner · Pull Request #132037 · python/cpython · GitHub

Open Graph Title: gh-118761: Optimise import time for ``string`` by AA-Turner · Pull Request #132037 · python/cpython

X Title: gh-118761: Optimise import time for ``string`` by AA-Turner · Pull Request #132037 · python/cpython

Description: This PR achieves a 27x improvement in import time for the string module. The main improvement comes from replacing Template.__init_subclass__() (GH-16256) with a descriptor class, allowing lazy imp...

Open Graph Description: This PR achieves a 27x improvement in import time for the string module. The main improvement comes from replacing Template.__init_subclass__() (GH-16256) with a descriptor class, allowing lazy imp...

X Description: This PR achieves a 27x improvement in import time for the string module. The main improvement comes from replacing Template.__init_subclass__() (GH-16256) with a descriptor class, allowing lazy imp...

Opengraph URL: https://github.com/python/cpython/pull/132037

X: @github

direct link

Domain: github.com

route-pattern/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:8d7cdaca-ede8-7295-d4c6-97b4ff64a008
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id84D8:350E6F:1C50F9:25D480:6969BE39
html-safe-nonce4843c37956e5c24e6e6697d7862a345bb720f04c98cee2b57abe872ac4b99947
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NEQ4OjM1MEU2RjoxQzUwRjk6MjVENDgwOjY5NjlCRTM5IiwidmlzaXRvcl9pZCI6IjU2ODIzMDk5NTk5MzIwMzQ2MTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac9b6b02cf56ef29552d0b52e2be3463d618e99ccf8fbcce702118cee15cefa2e8
hovercard-subject-tagpull_request:2435529213
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/python/cpython/132037/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/03c93168aea99c49c74f37768d7b83433672a369fe6ba35a87a1a143af16b465/python/cpython/pull/132037
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/03c93168aea99c49c74f37768d7b83433672a369fe6ba35a87a1a143af16b465/python/cpython/pull/132037
og:image:altThis PR achieves a 27x improvement in import time for the string module. The main improvement comes from replacing Template.__init_subclass__() (GH-16256) with a descriptor class, allowing lazy imp...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameAA-Turner
hostnamegithub.com
expected-hostnamegithub.com
Noneacedec8b5f975d9e3d494ddd8f949b0b8a0de59d393901e26f73df9dcba80056
turbo-cache-controlno-preview
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release83c08c21cdda978090dc44364b71aa5bc6dcea79
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/132037#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F132037
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F132037
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/132037
Reloadhttps://github.com/python/cpython/pull/132037
Reloadhttps://github.com/python/cpython/pull/132037
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/132037
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/pull/132037
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
Jump to bottomhttps://github.com/python/cpython/pull/132037#issue-comment-box
AA-Turnerhttps://github.com/AA-Turner
python:mainhttps://github.com/python/cpython/tree/main
AA-Turner:opt-stringhttps://github.com/AA-Turner/cpython/tree/opt-string
gh-118761: Optimise import time for string https://github.com/python/cpython/pull/132037#top
AA-Turnerhttps://github.com/AA-Turner
python:mainhttps://github.com/python/cpython/tree/main
AA-Turner:opt-stringhttps://github.com/AA-Turner/cpython/tree/opt-string
Conversation 13 https://github.com/python/cpython/pull/132037
Commits 6 https://github.com/python/cpython/pull/132037/commits
Checks 37 https://github.com/python/cpython/pull/132037/checks
Files changed https://github.com/python/cpython/pull/132037/files
Please reload this pagehttps://github.com/python/cpython/pull/132037
https://github.co/hiddenchars
https://github.com/python/cpython/pull/{{ revealButtonHref }}
https://github.com/AA-Turner
AA-Turnerhttps://github.com/AA-Turner
Apr 3, 2025https://github.com/python/cpython/pull/132037#issue-2967868992
Please reload this pagehttps://github.com/python/cpython/pull/132037
GH-16256https://github.com/python/cpython/pull/16256
Improve import time of various stdlib modules #118761https://github.com/python/cpython/issues/118761
Please reload this pagehttps://github.com/python/cpython/pull/132037
https://github.com/AA-Turner
Optimise import time for stringhttps://github.com/python/cpython/pull/132037/commits/ec78492ef1ae8db70d6b85c03310fad27af6170d
ec78492https://github.com/python/cpython/pull/132037/commits/ec78492ef1ae8db70d6b85c03310fad27af6170d
https://github.com/AA-Turner
AA-Turnerhttps://github.com/AA-Turner
performance https://github.com/python/cpython/issues?q=state%3Aopen%20label%3Aperformance
Apr 3, 2025https://github.com/python/cpython/pull/132037#event-17102872663
https://github.com/AA-Turner
AA-Turnerhttps://github.com/AA-Turner
serhiy-storchakahttps://github.com/serhiy-storchaka
April 3, 2025 00:41https://github.com/python/cpython/pull/132037#event-17102872675
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting core review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20core%20review%22
Apr 3, 2025https://github.com/python/cpython/pull/132037#event-17102873569
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
Apr 3, 2025 https://github.com/python/cpython/pull/132037#ref-issue-2285570381
Improve import time of various stdlib modules #118761 https://github.com/python/cpython/issues/118761
AA-Turnerhttps://github.com/AA-Turner
April 3, 2025 02:52https://github.com/python/cpython/pull/132037#commits-pushed-2b542c7
https://github.com/AA-Turner
Refactor to a common classmethodhttps://github.com/python/cpython/pull/132037/commits/2b542c76445ec12ffaa4b6b869d6be8192d3e044
2b542c7https://github.com/python/cpython/pull/132037/commits/2b542c76445ec12ffaa4b6b869d6be8192d3e044
https://github.com/AA-Turner
Add commenthttps://github.com/python/cpython/pull/132037/commits/e28e43ff093256eade1fe965e6e72eb352c75477
e28e43fhttps://github.com/python/cpython/pull/132037/commits/e28e43ff093256eade1fe965e6e72eb352c75477
https://github.com/Marius-Juston
Marius-Justonhttps://github.com/Marius-Juston
Apr 3, 2025 https://github.com/python/cpython/pull/132037#ref-pullrequest-2969074716
gh-137855: email.quoprimime removing re import #132046 https://github.com/python/cpython/pull/132046
https://github.com/AA-Turner
AA-Turnerhttps://github.com/AA-Turner
picnixzhttps://github.com/picnixz
April 6, 2025 04:37https://github.com/python/cpython/pull/132037#event-17142103799
https://github.com/picnixz
picnixzhttps://github.com/picnixz
Apr 6, 2025 https://github.com/python/cpython/pull/132037#pullrequestreview-2745080228
View reviewed changes https://github.com/python/cpython/pull/132037/files/e28e43ff093256eade1fe965e6e72eb352c75477
picnixzhttps://github.com/picnixz
https://github.com/python/cpython/pull/132037#pullrequestreview-2745080228
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/132037
Lib/string.pyhttps://github.com/python/cpython/pull/132037/files/e28e43ff093256eade1fe965e6e72eb352c75477#diff-f059a6f5063e6fac8156e2b670ac0ceeb265abf633d048217bc676dcd4192f2a
Please reload this pagehttps://github.com/python/cpython/pull/132037
https://github.com/apps/python-cla-bot
python-cla-bothttps://github.com/apps/python-cla-bot
Apr 6, 2025https://github.com/python/cpython/pull/132037#issuecomment-2781436811
https://cla.python.org/
Please reload this pagehttps://github.com/python/cpython/pull/132037
https://github.com/AA-Turner
Use None as the sentinelhttps://github.com/python/cpython/pull/132037/commits/056dd07bb50834ee07601661ff00de6f6bcd72fd
056dd07https://github.com/python/cpython/pull/132037/commits/056dd07bb50834ee07601661ff00de6f6bcd72fd
https://github.com/AA-Turner
AA-Turnerhttps://github.com/AA-Turner
picnixzhttps://github.com/picnixz
April 6, 2025 17:56https://github.com/python/cpython/pull/132037#event-17143857640
https://github.com/serhiy-storchaka
serhiy-storchakahttps://github.com/serhiy-storchaka
Apr 7, 2025 https://github.com/python/cpython/pull/132037#pullrequestreview-2745884411
View reviewed changes https://github.com/python/cpython/pull/132037/files/056dd07bb50834ee07601661ff00de6f6bcd72fd
serhiy-storchakahttps://github.com/serhiy-storchaka
https://github.com/python/cpython/pull/132037#pullrequestreview-2745884411
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/132037
Lib/string.pyhttps://github.com/python/cpython/pull/132037/files/056dd07bb50834ee07601661ff00de6f6bcd72fd#diff-f059a6f5063e6fac8156e2b670ac0ceeb265abf633d048217bc676dcd4192f2a
Please reload this pagehttps://github.com/python/cpython/pull/132037
https://github.com/AA-Turner
AA-Turnerhttps://github.com/AA-Turner
Apr 7, 2025https://github.com/python/cpython/pull/132037#issuecomment-2783823931
Please reload this pagehttps://github.com/python/cpython/pull/132037
https://github.com/AA-Turner
Make _TemplatePattern a singletonhttps://github.com/python/cpython/pull/132037/commits/bb3605a7d89acb288cabdf5e29dffc11b2567251
bb3605ahttps://github.com/python/cpython/pull/132037/commits/bb3605a7d89acb288cabdf5e29dffc11b2567251
https://github.com/serhiy-storchaka
serhiy-storchakahttps://github.com/serhiy-storchaka
Apr 8, 2025 https://github.com/python/cpython/pull/132037#pullrequestreview-2749322172
View reviewed changes https://github.com/python/cpython/pull/132037/files/bb3605a7d89acb288cabdf5e29dffc11b2567251
serhiy-storchakahttps://github.com/serhiy-storchaka
https://github.com/python/cpython/pull/132037#pullrequestreview-2749322172
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/132037
Lib/string.pyhttps://github.com/python/cpython/pull/132037/files/bb3605a7d89acb288cabdf5e29dffc11b2567251#diff-f059a6f5063e6fac8156e2b670ac0ceeb265abf633d048217bc676dcd4192f2a
Please reload this pagehttps://github.com/python/cpython/pull/132037
https://github.com/AA-Turner
https://github.com/serhiy-storchaka
Serhiy's suggestionhttps://github.com/python/cpython/pull/132037/commits/6fb9b5d65c2822012efe47bf7158227bcfde4ce0
6fb9b5dhttps://github.com/python/cpython/pull/132037/commits/6fb9b5d65c2822012efe47bf7158227bcfde4ce0
https://github.com/AA-Turner
AA-Turnerhttps://github.com/AA-Turner
April 8, 2025 09:44https://github.com/python/cpython/pull/132037#event-17167706658
https://github.com/AA-Turner
AA-Turnerhttps://github.com/AA-Turner
ee36572https://github.com/python/cpython/commit/ee3657209b1464d66c89640e4db0dccdeec5b45c
Apr 8, 2025https://github.com/python/cpython/pull/132037#event-17168040911
Please reload this pagehttps://github.com/python/cpython/pull/132037
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting core review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20core%20review%22
Apr 8, 2025https://github.com/python/cpython/pull/132037#event-17168041794
https://github.com/AA-Turner
AA-Turnerhttps://github.com/AA-Turner
April 8, 2025 10:07https://github.com/python/cpython/pull/132037#event-17168066499
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F132037
https://github.com/serhiy-storchaka
serhiy-storchaka https://github.com/serhiy-storchaka
https://github.com/python/cpython/pull/132037/files/bb3605a7d89acb288cabdf5e29dffc11b2567251
https://github.com/picnixz
picnixz https://github.com/picnixz
performance https://github.com/python/cpython/issues?q=state%3Aopen%20label%3Aperformance
Please reload this pagehttps://github.com/python/cpython/pull/132037
https://github.com/AA-Turner
https://github.com/serhiy-storchaka
https://github.com/picnixz
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.