powerlevel9k icon indicating copy to clipboard operation
powerlevel9k copied to clipboard

Extremely slow public_ip prompt when disconnected from the Internet

Open romkatv opened this issue 6 years ago • 0 comments

To reproduce:

  1. Disconnect from the Internet.
  2. 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.

romkatv avatar Jun 21 '19 18:06 romkatv