prompt-toolkit / prompt-toolkit/python-prompt-toolkit
Improve prompt_toolkit import time
Open
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:

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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