-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MacOS startup time is so slow #6205
Comments
Is the startup time slow with copilot disabled too? Based on the logs you've provided the request seems to be timing out. |
This is a clean installation. No configuration after being copied to the applications directory on a system where it was not previously installed. I checked just now, Copilot is turned off. Disabling all network interfaces did not speed up the startup process. When no network interfaces are available, any connection attempt is instantly terminated without any waiting period. |
Hmm, what buffer font have you set in your config? I managed to get very slow startup times with specific fonts in #4695 |
I've said this in other places, but Iosevka is MASSIVE. Honestly, outside of something that is preloaded like it is in Zed I really wouldn't recommend using it without subsetting the font to something smaller... It has hundreds of thousands of character glyphs in it by default, resulting in truly a massive font size (go compare the font size of a single weight of Iosevka to almost any other font, its 10x+ larger 😬) |
I take it this refers specifically to it having way more control points per glyph than it needs rather than the number of glyphs? Since the problem does not occur with Arial Unicode MS (ships with macOS by default AFAIK). |
It's interesting that I use this font everywhere, and I haven't noticed any software running slower with it. I can only assume that the font rendering or loading method using in Zed differs from the one used other software in MacOS. It would be odd to describe in the documentation for a programming editor which fonts are desirable or undesirable to use. Thank you for the tip on trimming the font to only the used set of characters. I will give it a try as a temporary solution. |
Yeah, on our side we will need to see what is causing this. It's been an ongoing issue, but oddly has only showed up with this font. |
If any debugging or other assistance is required from my end, I will be glad to help. |
I observe the similar slow startup times on macos with Two subsequent startup times are:
User level |
Details are in zed-industries/font-kit#1; We're not doing anything too fancy, really. Still, you should mostly see font loading times drop significantly for font collections Release Notes: - Improved loading performance of large font collections (e.g. Iosevka). Fixes https://github.com/zed-industries/community/issues/1745, https://github.com/zed-industries/community/issues/246 https://github.com/zed-industries/zed/assets/24362066/f70edbad-ded6-4c12-9c6d-7a487f330a1b
This should be fixed in v0.119.9-pre - please reopen if the issue persists. |
This issue persists for me, it takes about a good 9 seconds for zed to launch the first time, my settings are pretty much untouched: {
"telemetry": {
"metrics": false,
"diagnostics": false
},
"ui_font_size": 16,
"buffer_font_size": 16
} logs:
I'm on Zed 0.121.7 on Sonoma 14.2.1 |
In my case, Zed Preview ( {
"show_copilot_suggestions": true,
"terminal": {
"dock": "bottom"
},
"project_panel": {
"dock": "right",
"folder_icons": false
},
"toolbar": {
"breadcrumbs": false,
"quick_actions": false
},
"vertical_scroll_margin": 10,
"buffer_font_family": "Fira Code",
"buffer_font_size": 12,
"ui_font_family": "Inter",
"ui_font_size": 15,
"theme": "One Dark",
"autosave": "off",
"format_on_save": "off",
"buffer_line_height": "comfortable",
"tab_size": 2,
"confirm_quit": true,
"show_whitespaces": "all",
"wrap_guides": [100],
"features": {
"copilot": true
},
"tabs": {
"close_position": "left",
"git_status": true
},
"assistant": {
}
} And logs:
System specs:
|
Also slow startup time on MacOS M1 Sonoma 14.2.1 (23C71) and Zed 0.122.2
|
This should probably be fixed by #7775 |
Just to add more info regarding this problem: In my case, the startup time takes 6-7 seconds if I didn't launch it recently (So not the first after reboot). I don't have any heavy font configured, Copilot is disabled:
|
@NicoAdrian which version? |
@mrnugget 0.123.2 |
Ohh, good eyes, @evrsen! Yes, the fix is only in 0.124.0-pre, so that should probably fix it, @NicoAdrian! |
Slow startup times are still happening for me on Zed Preview 0.124.1 , even taking longer than before? solid 10-12 seconds.
Edit: Updated to Zed Preview 0.124.4 and it's taking about 6-7 seconds now:
|
Can confirm that nothing changed here too - v |
Same, the pre-release doesn't change anything. I know it's probably not your fault (if it's the root cause @mrnugget said), but it's pretty annoying for an editor that supposed to be blazing fast (it is indeed when I relaunch the app after a slow startup). Will be using vscode and good old vim until a permanent fix is released. |
100%. I hear you. We'll need to look into this again. |
For me: It's 3/4x faster than VSCode. zed-speed.mp4 |
@mrnugget In my case, it doesn't look like it depends on a fresh startup of the Mac - I usually just put it to sleep, and yet most of the time when I start Zed, I wait 6-7 seconds. |
@hamza72x the issue many of us have is that zed's startup time is slow in the first launch after the os is booted, not after. |
@evrsen That's sad to hear. To test out, I have restarted both of my mac (m1 + m1 pro). And opened |
Interesting, can you share your Zed version and macOS version? Could you also run the command below in
Might help the Zed team debug this problem. |
When you close Zed, do you use CMD+Q or just click on the red cross in the up left corner of the app ? |
@evrsen Did you mean? ls -la /Applications/Zed.app
drwxr-xr-x nix staff 96 B Sat Feb 24 00:20:49 2024 .
drwxrwxr-x root admin 2.0 KB Sun Feb 25 14:09:08 2024 ..
drwxr-xr-x nix staff 288 B Sat Feb 24 00:23:45 2024 Contents @NicoAdrian |
@evrsen Zed 0.123.6 |
No, use the macOS native Terminal.app, not Iterm or another |
No, it's |
Thank you, ok now this is very interesting, I believe we previously thought apple putting Zed in quarantine because of some stapling issue was the cause of the slow startup time, I think you just confirmed that this isn't the case.? @mrnugget |
Yeah, that's the tricky part. For me it is instant, but I also have |
Instant in every case ? After reboot ? After not launching it for a long time (hours for ex) ? |
I don't think so, but it's hard to nail down. I've certainly had slow starts since the last fix shipped, but I cannot confidently say that these were independent of "zed just updated". macOS Sonoma 14.2 |
So @mrnugget, will it eventually be fixed in the future ? When Apple decides to "trust" this app ? |
Can you reliably reproduce it? That's the hard part, because I can't. |
Yes I do. After reboot AND after I haven't launch Zed after a long time. |
I updated all Zed versions I have and then rebooted twice. Both times I could observe the same thing:
Now I'm wondering
The quarantine status is the same for all 3: ~ φ ls -l@ /Applications/Zed.app
total 0
drwxr-xr-x@ 9 thorstenball staff 288 Mar 24 17:41 Contents
com.apple.provenance 11
com.apple.quarantine 21
~ φ ls -l@ /Applications/Zed\ Preview.app
total 0
drwxr-xr-x@ 9 thorstenball staff 288 Mar 21 04:29 Contents
com.apple.provenance 11
com.apple.quarantine 21
~ φ ls -l@ /Applications/Zed\ Nightly.app
total 0
drwxr-xr-x@ 9 thorstenball staff 288 Mar 23 06:48 Contents
com.apple.provenance 11
com.apple.quarantine 21 |
@mrnugget In this thread or another I don't remember, someone fixed the .dmg file because it was not signed or something like that. I don't know if it's related but I wondered if uninstalling Zed and redownloading it from your website (so to get the new .dmg file) would fix the problem and apparently it does ! I haven't had any slow startup since. |
@NicoAdrian that's probably #8671 |
Well, that's a requirement for all of the fixes that we discussed in this thread too :) So you're saying that complete uninstall and reinstall fixed it, yes? If so: great! happy to hear it! |
Yea it's fixed for me. If it's the right thing to do (uninstalling then reinstall), then the problem won't be fixed for everyone who already have the non signed version ? |
Yeah, I'm not sure whether we can fix that to be honest, haven't looked into our auto-updater too much yet. |
Check for existing issues
Describe the bug / provide steps to reproduce it
The promotional materials on the website suggest that the startup time of Sublime and Zed should be practically the same. However, in reality, Sublime starts almost instantly, while Zed takes around 4-5 seconds to display its window. This refers to a clean installation without any additional settings.
Environment
Zed: v0.93.4 (stable)
OS: macOS 13.4.1
Memory: 32 GiB
Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
Screen.Recording.2023-07-10.at.22.24.07.mov
Recorded a video showing the difference in speed between running Zed and Sublime.
If applicable, attach your
~/Library/Logs/Zed/Zed.log
file to this issue.If you only need the most recent lines, you can run the
zed: open log
command palette action to see the last 1000.Zed.log
The text was updated successfully, but these errors were encountered: