prompt-toolkit / prompt-toolkit/python-prompt-toolkit

Improve prompt_toolkit import time

Open
#1,592 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
10.6k
Forks
815
PR merge metrics
No merged PRs in 30d

Description

Importing prompt_toolkit takes quite some time. I tested with:

# pip install importtime-waterfall tuna

python -X importtime -c "import prompt_toolkit" 2> i.log
tuna i.log

This results in:
image

Contributor guide

No contributing guide indexed for this repository

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 reproducing the reported profile with Python's -X importtime option and inspect the resulting i.log with tuna. Trace the slow imports in prompt_toolkit and reduce unnecessary import-time work; done means the import profile shows a measurable improvement without breaking the package import.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.