python / python/cpython

Improve import time of various stdlib modules

Open
#154,675 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.16 performance stdlib type-feature
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

Feature or enhancement

Proposal:

Following on from 3.15's https://github.com/python/cpython/issues/137855, further improvements can be made to import times in 3.16.

And rather than deferring imports, we can use lazy imports.

Linked PRs
  • gh-154657
  • gh-148409
  • gh-156567
  • gh-156801
  • gh-156803
  • gh-156841

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the six linked pull requests, especially gh-154657 and gh-148409, since the issue names no files, modules, or tests. Use those changes to identify the remaining standard-library import-time work and its completion criteria; the issue itself does not define a standalone task.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.