Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extremely Slow Shell Startup (10-20 seconds) #4846

Open
n00ki opened this issue Apr 28, 2024 · 7 comments
Open

Extremely Slow Shell Startup (10-20 seconds) #4846

n00ki opened this issue Apr 28, 2024 · 7 comments
Labels
Bugs Bugs, Hangs, Crash, and Freezes

Comments

@n00ki
Copy link

n00ki commented Apr 28, 2024

Discord username (optional)

No response

Describe the bug

Hi everyone 馃憢
After two full weeks of battling extremely slow shell startup time, which includes debugging each component individually, completely uninstalling and reinstalling everything, switching possible incompatible plugins and packages, entirely clearing zsh dot files, and even setting everything from the ground up on a new machine, I鈥檓 exhausted馃槳 and I鈥檓 reaching out for help.

About a month ago, I started to notice a significant degradation in shell startup time when launched from an idle state (meaning, after not being used for over ~20-30 minutes). I鈥檓 talking 10-20 seconds initialisation on application launch.
my ZSH config was never too heavy, but at the time, I did use OMZ with starship prompt and some libs like n, goenv, etc.
I started looking for answers online and chased down every possible cause. I uninstalled/reinstalled OMZ. I also uninstalled the starship prompt and reverted to the native one. I replaced n with NVM (which made things even worse), then fnm. goenv and others were removed. git was installed separately by brew (due to a GitHub issue I鈥檝e seen), then the git plugin was disabled entirely. Nothing!
used zprof to monitor loading times, yet there was no correlation between the measurements and the overall shell launching time (e.g. 0.02 seconds reported when the shell took around 15 seconds to start).
I gave up and decided to set everything up from scratch on another MacBook (MBP M1 Pro Sonoma).
I was absolutely shocked when the issue persisted! Beyond fnm, pnpm, and some aliases, nothing was there...and the issue persisted.
for a while this issue was reproducing both on Warp

and other terminals (iTerm2, native), but after removing a brew eval call in .zprofile - everything looked good on all others. Warp remains slow.
Then i tried to empty both .zshrc, .zshenv and .zprofile - nothing.
followed the docs and added ZDOTDIR=/ to .zshenv both in ~/ & /etc- no improvement. still slow.

  • the issue does not reproduce on subsequent launches, only once after the application is closed for over ~20 minutes.

attached is a screen recording of warp launching with ZDOTDIR=/.
i would highly appreciate any kind of assistance with figuring out and possibly solving this issue!
Thanks a lot in advance馃檹

To reproduce

  1. Lauch Warp
  • extremely slow shell startup
  1. Quit Warp
  2. Relaunch Warp
  • startup is normal as expected
  1. Quit Warp
  2. Wait for ~20-30 minutes
  3. Relaunch Warp
  • extremely slow shell startup

Expected behavior

No response

Screenshots

warp.slow.zdotdir.mp4

Operating system

MacOS

Operating system and version

14.4.1 (23E224)

Shell Version

zsh 5.9 (x86_64-apple-darwin23.0)

Current Warp version

v0.2024.04.23.08.01.stable_03

Regression

Yes, this bug started recently or with an X Warp version

Recent working Warp date

not sure

Additional context

No response

Does this block you from using Warp daily?

No

Is this a Warp specific issue? (i.e. does it happen in Terminal, iTerm, Kitty, etc.)

Yes, this I confirmed this only happens in Warp, not other terminals.

Warp Internal (ignore): linear-label:b9d78064-c89e-4973-b153-5178a31ee54e

None

@n00ki n00ki added the Bugs Bugs, Hangs, Crash, and Freezes label Apr 28, 2024
@dannyneira
Copy link
Member

Hi @n00ki sorry to hear about this frustrating issue. If your still seeing the zsh loadin issue, even with a clean ~/.zshrc file, it could be something with our bootstrap script, especially if this wasn't the case a month ago as you mentioned.

Please try the following:

  • Run echo 'ZDOTDIR=/' > ~/.zshenv This forces zsh to run with zero configs.
  • Remove Warp logs with sudo rm -r $HOME/.warp/ $HOME/Library/Logs/warp.log
  • Remove Warp database with sudo rm -r "$HOME/Library/Application Support/dev.warp.Warp-Stable"
  • Quit and reopen Warp
  • If the issue persists, then please provide us with the log file located at ~/Library/Logs/warp.log

@n00ki
Copy link
Author

n00ki commented May 1, 2024

hi @dannyneira! thanks for reaching out.
I've followed the detailed steps, yet the issue persists.
The log file is attached, as requested.
Thanks馃檹
warp.log

@n00ki
Copy link
Author

n00ki commented May 4, 2024

Any ideas?馃檹馃徏

@dannyneira
Copy link
Member

dannyneira commented May 6, 2024

Hi @n00ki It's not clear from the logs what the issue may be, is it possible you have an older system specs or large git repos on your machine?

@n00ki
Copy link
Author

n00ki commented May 7, 2024

hi @dannyneira
as mentioned, the issue persisted after switching to an entirely new machine (clean MacOS format). no large repos, either...

@n00ki
Copy link
Author

n00ki commented May 12, 2024

anyone? 馃く

@dannyneira
Copy link
Member

Its unclear what the underlying reason is for your zsh taking long to startup. I suspect it may be the shell binary itself. Please run which zsh to find the default zsh binary, then put the result into your Settings > Features > Session > Startup shell for new sessions > Custom after clearing your ~/.zshrc file.

If that doesn't help, your machine specs may be part of it. What is the Model/Specs of your Mac? The minimum requirements are macOS 10.14 or above and hardware that supports Metal. But that's just to run Warp, doesn't guarantee it will run fast if the machine has lower specs.

Also is it 10-20 seconds on first launch or every single new session?

After the above changes, please fresh set of logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugs Bugs, Hangs, Crash, and Freezes
Projects
None yet
Development

No branches or pull requests

2 participants