powerlevel9k
powerlevel9k copied to clipboard
Extremely slow public_ip prompt when disconnected from the Internet
To reproduce:
- Disconnect from the Internet.
- Open a new ZSH session with the following P9K config:
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(public_ip)
Expected: When I press enter, it takes less than two seconds for the next prompt to appear.
Actual: It takes more than two seconds.
Prompt latency depends on how exactly you are disconnected from the Internet. In the worst case it may take up to 30 seconds for each prompt to render when dig, curl and wget all time out. If I pull the Ethernet cable out of my Linux desktop, it's not that bad (all commands fairly early due to DNS failure). On macOS it's worse. On WSL is awful.