GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Optimize pdb with asyncio gating · Issue #156774 · python/cpython

Optimize pdb with asyncio gating #156774

New issue
Copy link
New issue
Copy link
Closed
Closed
Optimize pdb with asyncio gating#156774
Copy link
Labels
performancePerformance or resource usagePerformance or resource usagestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement

Description

@brittanyrey
brittanyrey
opened on Sep 1, 2026
Issue body actions

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 issue also included lazy imports optimizations, until @hugovk let me know that there was already a PR open to address that.

(PR is prepared)

Linked PRs

  • gh-156774: Speed up pdb startup with asyncio guard #156775

Activity

  1. brittanyrey
    added a commit that references this issue on Sep 1, 2026

    pythongh-156774: Point pdb lazy-import NEWS entry at the filed issue

    8d15fb1
  2. aisk
    added
    type-featureA feature request or enhancementA feature request or enhancement
    performancePerformance or resource usagePerformance or resource usage
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    on Sep 1, 2026
  3. hugovk
    added a parent issue on Sep 1, 2026
    • Improve import time of various stdlib modules #154675
  4. brittanyrey
    added a commit that references this issue on Sep 1, 2026

    pythongh-156774: Scope pdb change down to the asyncio import only

    89fccc3
  5. brittanyrey
    changed the title [-]Optimize pdb with lazy imports + asyncio gating[/-] [+]Optimize pdb with asyncio gating[/+] on Sep 1, 2026
  6. hugovk
    added a commit that references this issue on Sep 8, 2026

    gh-156774: Speed up pdb startup with asyncio guard (#156775)

    024b6bc
  7. hugovk
    closed this as completedon Sep 8, 2026
  8. maurycy
    added a commit that references this issue on Sep 10, 2026

    Merge branch 'main' into tachyon-native-callable

    e028ff5
  9. clin1234
    added a commit that references this issue on Sep 12, 2026

    pythongh-156774: Speed up pdb startup with asyncio guard (python#156775)

    72e3dff
  10. johnslavik
    added a commit that references this issue on Sep 14, 2026

    pythongh-156774: Speed up pdb startup with asyncio guard (python#156775)

    ec0299c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    performancePerformance or resource usagePerformance or resource usagestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.