Title: Optimize pdb with asyncio gating · Issue #156774 · python/cpython · GitHub
Open Graph Title: Optimize pdb with asyncio gating · Issue #156774 · python/cpython
X Title: Optimize pdb with asyncio gating · Issue #156774 · python/cpython
Description: Summary import pdb costs ~84 ms. The largest single contributor is asyncio at ~36 ms — imported for exactly one call site. Only import asyncio in pdb, if asyncio is actually being used by the program being debugged. NOTE: initially this ...
Open Graph Description: Summary import pdb costs ~84 ms. The largest single contributor is asyncio at ~36 ms — imported for exactly one call site. Only import asyncio in pdb, if asyncio is actually being used by the progr...
X Description: Summary import pdb costs ~84 ms. The largest single contributor is asyncio at ~36 ms — imported for exactly one call site. Only import asyncio in pdb, if asyncio is actually being used by the progr...
Opengraph URL: https://github.com/python/cpython/issues/156774
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Optimize pdb with asyncio gating","articleBody":"### Summary\n\n`import pdb` costs ~84 ms. The largest single contributor is `asyncio` at ~36 ms — imported for\nexactly one call site. \n\nOnly import asyncio in pdb, if asyncio is actually being used by the program being debugged.\n\nNOTE: initially this issue also included lazy imports optimizations, until @hugovk let me know that there was already a PR open to address that. \n\n(PR is prepared)\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-156775\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/brittanyrey","@type":"Person","name":"brittanyrey"},"datePublished":"2026-09-01T13:52:16Z","url":"https://github.com/python/cpython/issues/156774"}
| 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:79917307-aa33-ee61-6ace-b334a0c25c5f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8566:10531B:2AE3502:36DD9BB:6B01F254 |
| html-safe-nonce | cd3298dec9f8aced8e7b7845744958a0e60efa32d1f953fffa1aaca0e2622378 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NTY2OjEwNTMxQjoyQUUzNTAyOjM2REQ5QkI6NkIwMUYyNTQiLCJ2aXNpdG9yX2lkIjoiMTk2ODA1Mzg2MTkyNzIxOTc5NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 37b2439832fedd4f01229d6b6a736c6821d7709326952676c42770287e974642 |
| hovercard-subject-tag | issue:5312681843 |
| 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/156774/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a66aec59f0ea6b733b75d7a355c2968e799a0e809e1484370f4eee16792485b3/python/cpython/issues/156774 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a66aec59f0ea6b733b75d7a355c2968e799a0e809e1484370f4eee16792485b3/python/cpython/issues/156774 |
| og:image:alt | Summary import pdb costs ~84 ms. The largest single contributor is asyncio at ~36 ms — imported for exactly one call site. Only import asyncio in pdb, if asyncio is actually being used by the progr... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | brittanyrey |
| 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