prompt-toolkit / prompt-toolkit/python-prompt-toolkit
Writing to terminal feels unresponsive
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10.6k
- Forks
- 815
- PR merge metrics
- No merged PRs in 30d
Description
def default():
vt_key = None
if confirm('Use vt?'):
vt_key = prompt('Key:', validator=VTKeyValidator(), validate_while_typing=False)
In this case, VTKeyValidator is using the network to validate the input.
My problem is that simply typing in terminal takes half a second to display the typed character.
- package version
2.0.9 - OS: Ubuntu 18.04 bionic
- Kernel: x86_64 Linux 4.18.0-20-generic
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 provided default() example with prompt() and VTKeyValidator(), focusing on the delay caused by network validation while typing. Trace the input and validation entry points to determine how typing can remain responsive during validation; done means terminal characters appear without the reported half-second delay.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, performance
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100