René's URL Explorer Experiment


Title: gh-109653: Improve import time of `logging` by lazy loading `traceback` by danielhollas · Pull Request #112995 · python/cpython · GitHub

Open Graph Title: gh-109653: Improve import time of `logging` by lazy loading `traceback` by danielhollas · Pull Request #112995 · python/cpython

X Title: gh-109653: Improve import time of `logging` by lazy loading `traceback` by danielhollas · Pull Request #112995 · python/cpython

Description: Lazy importing traceback module in logging improves the import time by ~15% on my machine (PGO-optimized build on Linux). Since traceback is used here to handle exceptions, these code paths should ...

Open Graph Description: Lazy importing traceback module in logging improves the import time by ~15% on my machine (PGO-optimized build on Linux). Since traceback is used here to handle exceptions, these code paths should ...

X Description: Lazy importing traceback module in logging improves the import time by ~15% on my machine (PGO-optimized build on Linux). Since traceback is used here to handle exceptions, these code paths should ...

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

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:7bf2c173-53ff-1749-4ad2-ec6a30891442
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD7C8:1CEAED:C2B5F9:105C8D9:696AC058
html-safe-noncef3c95f2aa68828828f137b3e2813471f44f63e3a0c62052a8673ad62aa5e28c4
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEN0M4OjFDRUFFRDpDMkI1Rjk6MTA1QzhEOTo2OTZBQzA1OCIsInZpc2l0b3JfaWQiOiIzMjE1MjUxMTYxMzc0OTY1ODQ4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac44c9564fe23a2f98cc1c86b0eeee0dda6b9b921cfd0bac9170dc99f9d08ad3b7
hovercard-subject-tagpull_request:1640273502
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/112995/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/61b366b460477ad795e91bf07056598113416b99a58c35fb9c7dd9444e5b8f04/python/cpython/pull/112995
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/61b366b460477ad795e91bf07056598113416b99a58c35fb9c7dd9444e5b8f04/python/cpython/pull/112995
og:image:altLazy importing traceback module in logging improves the import time by ~15% on my machine (PGO-optimized build on Linux). Since traceback is used here to handle exceptions, these code paths should ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedanielhollas
hostnamegithub.com
expected-hostnamegithub.com
None46ce962e0e18113ea447391b6ace8b02d4d2861e57b4fbab3658698f73d8855b
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
release30300f30bb3949de255e84a146706a3bdb5c19c9
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/112995#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F112995
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%2F112995
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/112995
Reloadhttps://github.com/python/cpython/pull/112995
Reloadhttps://github.com/python/cpython/pull/112995
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/112995
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/112995
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/112995#issue-comment-box
danielhollashttps://github.com/danielhollas
python:mainhttps://github.com/python/cpython/tree/main
danielhollas:import-logging-speeduphttps://github.com/danielhollas/cpython/tree/import-logging-speedup
gh-109653: Improve import time of logging by lazy loading traceback https://github.com/python/cpython/pull/112995#top
danielhollashttps://github.com/danielhollas
python:mainhttps://github.com/python/cpython/tree/main
danielhollas:import-logging-speeduphttps://github.com/danielhollas/cpython/tree/import-logging-speedup
Conversation 7 https://github.com/python/cpython/pull/112995
Commits 2 https://github.com/python/cpython/pull/112995/commits
Checks 0 https://github.com/python/cpython/pull/112995/checks
Files changed https://github.com/python/cpython/pull/112995/files
Please reload this pagehttps://github.com/python/cpython/pull/112995
https://github.co/hiddenchars
https://github.com/python/cpython/pull/{{ revealButtonHref }}
https://github.com/danielhollas
danielhollashttps://github.com/danielhollas
Dec 12, 2023https://github.com/python/cpython/pull/112995#issue-2037283375
Please reload this pagehttps://github.com/python/cpython/pull/112995
a trick proposed in a similar PRhttps://github.com/python/cpython/pull/112244#discussion_r1405165765
Improve import time of various stdlib modules #109653https://github.com/python/cpython/issues/109653
Please reload this pagehttps://github.com/python/cpython/pull/112995
danielhollashttps://github.com/danielhollas
December 10, 2023 02:29https://github.com/python/cpython/pull/112995#commits-pushed-6c4e173
https://github.com/danielhollas
Speed up import time of logging modulehttps://github.com/python/cpython/pull/112995/commits/6c4e1738e2fc6f1c6872d7729c72d79457c62c1e
6c4e173https://github.com/python/cpython/pull/112995/commits/6c4e1738e2fc6f1c6872d7729c72d79457c62c1e
python#109653https://github.com/python/cpython/issues/109653
https://github.com/danielhollas
Add NEWS entryhttps://github.com/python/cpython/pull/112995/commits/5ae66a224d971c34df274b2dd544c846d762a592
5ae66a2https://github.com/python/cpython/pull/112995/commits/5ae66a224d971c34df274b2dd544c846d762a592
https://github.com/ghost
ghosthttps://github.com/ghost
Dec 12, 2023https://github.com/python/cpython/pull/112995#issuecomment-1851565355
Please reload this pagehttps://github.com/python/cpython/pull/112995
https://cpython-clabot.herokuapp.com/signed-contributor-license-agreement?version=96a49432-b8b1-11ec-9bf5-bfe9ad6c72c4
Please reload this pagehttps://github.com/python/cpython/pull/112995
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
Dec 12, 2023 https://github.com/python/cpython/pull/112995#ref-issue-1907228354
Improve import time of various stdlib modules #109653 https://github.com/python/cpython/issues/109653
https://github.com/jgeralnik
jgeralnikhttps://github.com/jgeralnik
Dec 12, 2023https://github.com/python/cpython/pull/112995#issuecomment-1852308505
Please reload this pagehttps://github.com/python/cpython/pull/112995
https://github.com/danielhollas
danielhollashttps://github.com/danielhollas
Dec 12, 2023https://github.com/python/cpython/pull/112995#issuecomment-1852407545
@jgeralnikhttps://github.com/jgeralnik
Please reload this pagehttps://github.com/python/cpython/pull/112995
https://github.com/danielhollas
danielhollashttps://github.com/danielhollas
Dec 14, 2023https://github.com/python/cpython/pull/112995#issuecomment-1855038185
@AlexWaygoodhttps://github.com/AlexWaygood
Please reload this pagehttps://github.com/python/cpython/pull/112995
https://github.com/danielhollas
danielhollashttps://github.com/danielhollas
Jan 24, 2024https://github.com/python/cpython/pull/112995#issuecomment-1908340888
@AlexWaygoodhttps://github.com/AlexWaygood
Please reload this pagehttps://github.com/python/cpython/pull/112995
https://github.com/danielhollas
danielhollashttps://github.com/danielhollas
Jan 24, 2024https://github.com/python/cpython/pull/112995#event-11585823838
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
Jan 24, 2024https://github.com/python/cpython/pull/112995#issuecomment-1908343976
Please reload this pagehttps://github.com/python/cpython/pull/112995
https://github.com/danielhollas
danielhollashttps://github.com/danielhollas
January 24, 2024 15:24https://github.com/python/cpython/pull/112995#event-11585922782
https://github.com/danielhollas
danielhollashttps://github.com/danielhollas
Jan 24, 2024https://github.com/python/cpython/pull/112995#issuecomment-1908360612
@AlexWaygoodhttps://github.com/AlexWaygood
#114509https://github.com/python/cpython/pull/114509
Please reload this pagehttps://github.com/python/cpython/pull/112995
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%2F112995
https://github.com/vsajip
vsajip https://github.com/vsajip
Please reload this pagehttps://github.com/python/cpython/pull/112995
https://github.com/danielhollas
https://github.com/jgeralnik
https://github.com/AlexWaygood
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.