548 points · by meetpateltech · 1y ago · 365 comments
Also after install, the install directory takes up 400MB+. Even VSCode only takes up around 380MB. I believe it when they say it's not an Electron app, but I do wonder what's being packed in there. I was always under the impresion that Rust apps are pretty lightweight, but that install size is nearing Java levels of binary/dependency bloat.
RAM:
213 MB Zed
41 MB ST
Storage:
406 MB Zed
52 MB ST
Startup time:
Zed is slower than ST (but only by a few milliseconds).
Also when you reopen ST it will remember how you've resized the window from last time whereas Zed won't.
Haha wait what? Are you confusing Zed (the text editor) with something else? Surely it doesn't ship with video conferencing???
I disagree Zed is an IDE, it is quite far from InteliJ, Borland/Embarcadero, VS, XCode, Eclipse, Netbeans...
If it is about adding enough plugins until it eventually becomes one, then any programmer's editor is an IDE.
Zed is the new emacs?
For me, as long as it's better than alternatives it's good enough. Especially if it's not running JS.
For what it's worth, the zed executable on Linux weighs 3.2 MB.
EDIT: Sorry, the nix store is too good at hiding things from me. It's actually around 337 MB plus webrtc-sys.
$ pwd
/tmp/zed/target/release
$ ls -lh ./zed
-rwx------ 2 john john 1.4G Aug 28 17:10 zed
--- $ dut zed/ | sort -h
598M 0B | | /- webrtc-sys-0a11149cbc74bc90
598M 0B | | | /- out
598M 0B | | |- webrtc-sys-090125d01b76a5e8
635M 160M | | /- s-hal7osjfce-1h7vhjb-4bdtrsk93m145adnqs17i9dxe
635M 160M | | |- project-06kh4lhaqfutk
641M 161M | | /- project-1ulvakop54j8y
641M 161M | | | /- s-hal5rdrth3-0j8nxqq-d0wsc7qnin39797z4e8ibhj4w
1.1G 1.1G | | /- zed-ed67419e7a858570
1.1G 1.1G | |- zed
1.3G 1.3G | /- zed-64b9faeefdf3b7df
1.3G 1.3G |- zed
1.4G 0B |- build
2.2G 0B | |- build
7.9G 1.4G /- deps
9.4G 0B |- release
14G 2.9G | |- incremental
19G 4.2G | /- deps
33G 0B /- debug
42G 0B /- target
42G 0B zed
Summary: $ du -h ./target/debug/deps/
20G ./target/debug/deps/
$ du -h ./target/release/deps/
8.0G ./target/release/deps/
$ du -h ./target/debug/zed
1.2G ./target/debug/zed
$ du -h ./target/release/zed
1.4G ./target/release/zed
This is on a whole new level of bloat; both with regarding to dependencies AND the resulting executable file(s) (EDIT: executable files are unstripped).Any explanations as to why "cargo" does not seem to re-use libraries (dependencies) in a shared directory, or why it needs >2000 dependencies (that I see being downloaded and compiled), or why the executable file of the release mode is 1.4G unstripped while of the debug one it is less?
ls -lh /nix/store/63rdpgbzn7f1smh7688crcrpfsh833bb-zed-editor-0.199.10/bin/zeditor
-r-xr-xr-x. 2 root root 3.2M Jan 1 1970 /nix/store/63rdpgbzn7f1smh7688crcrpfsh833bb-zed-editor-0.199.10/bin/zeditor
EDIT: Ah, it was too good to be true. The true binary is hidden in libexec/.zed-editor-wrapped :( ls -lh /nix/store/52smrb1z8r4n71zx50xagkcdrhlga4y5-zed-editor-0.207.4/libexec/.zed-editor-wrapped
-r-xr-xr-x. 2 root root 337M Jan 1 1970 /nix/store/52smrb1z8r4n71zx50xagkcdrhlga4y5-zed-editor-0.207.4/libexec/.zed-editor-wrapped
Extra weight also comes from webrtc, which nixpkgs dynamically links. So yeah, it's quite a large binary indeed.Or the fact that there is incremental compilation artifacts...
And of course the amount of dependencies. A single project might depend on hundreds of crates (quite common), each compiled separately with its own build artifacts. sighs.
This needs to be justified asap to help people understand and reconsider installing it.
> At this time, we prioritize performance and out-of-the-box functionality over minimal binary size. As is, this issue isn't very actionable, but if you have concrete optimization ideas that don't compromise these priorities, we'd be happy to consider them in a new issue.
The world moved into dynamic linking in the 1980's for a reason.
It is cool to advocate for a return to static linking when it is basic CLI tools.
897MB! But it appears to have installed itself twice for some reason. Maybe one is an 'update' which it didn't clean up...? I'm not sure.
Edit: I just opened it and it cleaned itself up. 408MB now. I guess it was in the process of upgrading.
For people who are serious about their text editors, 400m is a small price to pay for something that works for you.
I'm not sure what gave you that impression. I'd say Rust is pretty well known for fat binaries
And that's still comparing apples to oranges, because git is compiled with full optimizations. Running `cargo build --release` produces a 462KB binary.
Even if I'm comparing to my system's git installation, that's still 3.9MB, and that's with all the debug info stripped.
Yes rust (like C++) tends to produce larger binaries than C, but lets be real here: The reason Zed has a bloated binary is the ~2000 rust packages that comprise it.
Hundreds of those MBs are from tree-sitter grammars, which are JavaScript compiled to C.
Maybe compared to electron, but binary size is an issue with any nontrivial rust application. Due to how cargo works, it compiles and bundles in every dependency in world.
400MB is unnecessarily large though.
Half of Electron namely Node.js. As majority of lsp are .js based. Also extensions are WASM. Also VS Code keeps extensions in separate config directory, while Zed in main directory.
400 mb for new project in this amazing bestest compiled language ever made is ridiculous.
The only feature that is preventing me from switching to Zed is the current lack of DevContainer support[1]. After investing a significant amount of time perfecting a devcontainer (custom fat image with all tools/libs + config), it would be a large step backwards to go back to installing everything locally.
There's a lot of eyes on this feature, so I'm hopeful it will be implemented in the future.
All the other editors I use are aware of outside changes, but not Zed. And I'm just not willing to close and reopen the file to get fresh contents. Eventually, I'll forget to do it and lose some work.
Changes to open files without any modifications in the buffer are always shown. Are you using any kind of containers or virtual fs that might be interfering?
Interestingly, Zed displays the change right away for the first time, but any other edits are not picked up. I'm using Zed's installer, Zed updated to the latest version, no containers or virtual fs, my partitions are ext4.
What's worse is C++ autocomplete - both on the same project with clang and CMake - it might be that I need some more setup, but I felt like Zed understood much less of tricky modern C++ (tbf, VS Code isn't perfect either) and the autocomplete was kinda broken. I fully admit this might be due to my own inexperience, so I won't hold it against Zed, but so far I haven't seen anything significantly better to justify making the switch.
I agree from a company perspective using dev containers gets all devs on the same page
I’m all for documenting every bit of my setup, but beyond that…
In the devcontainer you can run code snippets, use the system shell and access an execution environment close to production if well made.
It also allows to avoid (system) dependency conflicts between different projects you may work on.
Why not write that document as a bunch of build instructions instead of free-form text, while also isolating the result from the rest of the system.
There's other toolchains that are more involved or conflict with an operating system's pre-installed stuff, like (iirc) Ruby on MacOS.
What are you getting beyond what normal docker-compose gets you was the question I should have asked.
There were like a dozen answers all referring to things I think you can just use docker compose for.
Did I miss something?
As I understand, DirectWrite font rendering uses Windows subpixel font rendering. It seems OK on my monitor (better than the linux version) but haven't done any pixel peeping.
They seem to have anticipated this issue and designed it accordingly!
Seems like the only way to get high quality font rendering these days is a 4k+ display.
Just be aware that half the population prefers Windows font rendering.
1. I deleted a few hours of work because I was late night coding and I decided to rename a file before check-in and delete the old version. Well I renamed it and Right-Click -> Deleted the new version by accident.
It turns out Zed has both "Delete" and "Trash" right next to each other in its right-click menu. Delete skips the trash and Zed does not implement Ctrl+Z yet, so unless you have a backup that file is gone. Because I renamed it and had not yet checked in it wasn't in version control yet.
2. For some reason a particular crate in my Rust workspace wasn't having errors and warnings show up in the editor. I messed with configuration a bunch and couldn't figure it out, so I tried VSCode and it just worked without any additional configuration.
I'm not going to claim Zed has a good UI in this space, but saying it doesn't implement Ctrl + Z for a feature which is literally "skip the undo-ability of this option" is a bit misleading.
After years of deleting files in VSCode I have a muscle memory for that behavior and I just skip through the dialogue. I didn't realize Zed's 'Delete' worked differently until I lost work, so I was just reflexively skipping through its confirm screen as well.
It randomly deleted 3-line chunks all across my codebase. No rhyme or reason. I was just about to commit a big change, so it was annoying.
It might have been a global search and replace, but there was no clue in the history. And I can't think what kind of regex it could have been.
Or maybe a bug in IPC with the language server?
Anyone got any clues about what I did?
(I love Zed, on Mac and Linux. Even went as far as buying a new graphics card as my 5-year-old one didn't have Vulcan support, which is pretty much mandatory for Zed)
If you then Ctrl+A to select all and press backspace, I wonder if that would delete all those 3-line chunks...
So --
* if there is no such dialog, it's on zed * If there is such a dialog and you clicked yes, it's on you
Just checked, there is a modal dialog that reads:
*Delete "asd"?*
(Cancel) (Delete)Zed's dialogue just says "Delete file.txt?" so if you're used to VSCode it's very easy to skip through that dialogue reflexively.
Wait, what? That seems like an incredibly important missing piece of functionality.
Like what's the benefit?
I would be using Zed full time if Sublime Text wasn't already perfect for me.
- Issues with various keybinds not working as expected, e.g. Ctrl+S to save works on my Linux machines but not Windows if Vim Mode is enabled
- Issues with LSPs/diagnostics not working on Windows the same way they work on macOS/Linux
- The terminal holds a lot of assumptions about how the system works that don't hold true on Windows, e.g. "the user has one shell they use for all things" or "setting environment variables in the OS is easy"
I love Zed on my work issued macbook and use it full time, but the Windows version still needs some work.
Windows has a GUI, how can it not be easy. /s
It isn't as easy as on Linux, but you press Windows, type env, click edit Variables then select User vs. System, the you press add. That's not too complicated.
If you want to talk about perf in the context of a text editor show me how big of a file you can load--especially if the file has no line breaks. Emacs has trouble here. If you load a minified js file it slows to a crawl especially if syntax highlighting is on. Also show me how fast the start up time is. This is another area where Emacs does not do well.
So Zed is available on Windows--but only if you have a x64 processor. Lots of people run Windows on Arm64 and I don't see any mention of Arm64. This is where the puck is heading.
Also noticed Emacs key binding is in beta still.
Also, I do not believe Windows on Arm64 is a very large demographic? Especially for developers, unless they're specifically into that platform.
The latest benchmark I could find is 2022 and it's nowhere as bad as you claim
https://github.com/microsoft/vscode/issues/161622#issuecomme...
Once you are beyond a bare minimum, every other speed metric is more important. Zed does really well on many of those, but some depend on the LSP, so they become the bottleneck quickly.
https://web-backend.simula.no/sites/default/files/publicatio...
> At the most sensitive, our findings reveal that some perceive delays below 40 ms. However, the median threshold suggests that motorvisual delays are more likely than not to go undetected below 51-90 ms.
By this study's numbers, 20ms is somewhat below the lower limit of ~40ms, but not too far below. 100ms would be easily perceivable - though, based on the other replies, it seems that VS Code does not actually have that much latency.
Don't confuse this with human reaction time, which is indeed an order of magnitude higher, at over 200ms. For one thing, reaction time is based on unpredictable events, whereas the appearance of keystrokes is highly predictable. It's based on the user's own keypresses, which a touch typer will usually have subconsciously planned (via muscle memory) several characters in advance. So the user will also be subconsciously predicting when the text will appear, and can notice if the timing is off. Also, even when it comes to unpredictable events, humans can discern, after the fact, the time difference between two previous sensory inputs (e.g. between feeling a keyboard key press down and seeing the character on screen), for much shorter time differences than the reaction time.
Of course, just because these levels of latency are perceptible doesn't mean they're a material obstacle to getting work done. As a relatively latency-sensitive person, I'm not sure whether they're a material obstacle. I just think they're annoying. Higher levels of latency (in the hundreds of ms) can definitely get in the way though, especially when the latency is variable (like SSH over cellular connections).
Also you can absolutely feel the visual difference between 60Hz (~16ms) and 120Hz (~8ms), and for audio it's even more nuanced.
Just because studies don't back this up yet doesn't make it false. I imagine this is really hard to measure accurately, and focusing only on neuron activity seems misguided too. Our bodies are more than just brains.
I have never, ever felt “latency” in editor UI. Any editor UI. It’s editing text for Pete’s sake. I can only type so fast, or read so fast.
It's the same with high dpi monitors. Some people (me included) are driven absolutely insane by the font rendering on low density monitors, and other people don't even notice a difference.
Honestly, consider yourself blessed. One less thing in the world to annoy you.
Me! Frame rate and input latency are very important for a tool I use for hours every day. Obviously that's not the only feature I look for in an editor but if an editor _doesn't_ have it, I skip it. I also try to work on devices with 120Hz displays and above these days.
But waaaaah they don't support a processor that accounts for probably less then 10% of Windows Machines
[Window Title]
Critical
[Main Instruction]
Unsupported GPU
[Content]
Zed uses DirectX for rendering and requires a compatible GPU.
Currently you are using a software emulated GPU (Microsoft Basic Render Driver) which
will result in awful performance.
For troubleshooting see: https://zed.dev/docs/windows
Set ZED_ALLOW_EMULATED_GPU=1 env var to permanently override.
[Skip] [Troubleshoot and Quit]
Ah bummer.It may not be an actual problem with zed either, despite the warning.
And if it was actually software emulated, which I can't believe for a moment, though I admit I never checked (I just always assumed the window contents were transmitted via some kind of video encoder) - then I can't imagine that a text editor would be a problem.
The input latency might not be as good as you'd like.
Yeah input latency is annoyingly rough, not super bad but _just_ laggy enough to make it annoying to use.
Debating how much I want to change things, I can directly punch into my Linux machine but all my dev IDEs are on a VM for a long list of reasons, and I doubt Zed is going to run on my old ThinkPad if it struggles on software rendering, but we'll see.
I'm really liking it thus far!
We should strive to write better software that is faster, smaller and more resilient.
"Storage is cheap" is a bad mentality. This way of thinking is why software only gets worse with time: let's have a 400mb binary, let's use javascript for everything, who needs optimization - just buy top of the shelf super computer. And it's why terabytes of storage might not be enough soon.
You can have custom functions in your language server that is not in spec and have your editor specific plugin call them.
I imagine there is a lot of this for typescript.
But I'm not sure if this can explain the speed difference..
One thing I noticed in the implementation is that it looks like it is using stdin/stdout for the JSONRPC inter-process communication, rather than named pipes or sockets. VSCode uses named pipes. I wouldn't be at all surprised if that's a significant bottleneck - I'm about to file a bug.
EDIT - commented on the tsserver thread here: https://github.com/zed-industries/zed/issues/18698#issuecomm...
The specific techniques used to send, receive, and parse JSON could matter.
(I'm asking instead of finding out myself because of the little interest I have in this editor)
https://zed.dev/docs/configuring-zed#auto-install-extensions
Either you have a community that happily maintains extensions or you have an "official" extension manager that rolls out an update every next year
> or you have an "official" extension manager that rolls out an update every next year
As a debian user, sign me up!
Seems like a reasonable ask.
I love my ARM Surface Pro, and Zed would make a wonderful editor on this hardware. If anyone from Zed is reading this, please think about it!
https://github.com/rust-lang/rust/issues/145864 was opened because of the the discrepancy
That is not a problem for code, but if you just want to open some random .txt file or .csv file, these are often enough not utf-8 encoded, especially if they contain non English text.
The github issue for this is showing progress, but I think it's a mistake to promote the editor to stable as is.
Unfortunately, there's a bunch of small things still holding me back. Proper file drag & drop for one, the ability to listen to audio files inside the editor, and even a bunch of extensions, in particular one that shows a spectrogram for an audio file.
Maybe my biggest gripe is that Python support is still better in VSCode. Clicking on definitions is faster and more reliable.
Yes ofc I can use Finder instead but in vscode I just cmd+p.
When vscode was released, Sublime was faster - and it stayed faster. But that wasn't enough to stop the rise of vscode.
Okay, I may ocassionally do some code editing on it. But most of the time it's gotta be VSCode or vim/nvim.
I haven't fully switched over to using it as my daily-driver because Zed's heavy reliance on GPU rendering means that it locks up every time I suspend & resume my Linux box [0,1] but I'm optimistic about the progress they're making on it.
Quick install on any platform and just works. And obviously plenty of configuration that’s available to you but if you haven’t I’d give that a go.
Tried zed, it's interesting but several things are missing including the ability to skip extensions auto-update... which imho is critical for security.
I'd like to properly give it a go one day due to the effort put into its vim keybindings, but until then I'll stick to neovim.
Sounds great. Looking forward to doing a simple test run with Astro SSG
Last I checked, cheapest MacBook is $999+ for the air.
I hope Zed stays clean. We'll see. So far so good. Was quite happy they had a JetBrains base hotkey setup. Had to add a few of my own but I could pretty easily, nothing missing so far.
i can’t describe it in any other way other than it feels cold to use
i wonder if anyone else felt the same in earlier versions and feels that it’s fixed
> winget search zed
Name Id Version Match Source
-----------------------------------------------------------------------------------------------------------------------
Zed Preview ZedIndustries.Zed 0.208.4-pre Moniker: zed winget
So not fully updated yet it seems.It's native code, and it shows. It also has some AI integrations that are different, but I don't know how well they work.
It looks nice, but I haven't managed to use it for long.
Bye
What I meant was there are so many problems with Windows that the team cannot do it quickly (they post about it before: https://zed.dev/blog/windows-progress-report).
Just surprised, as I thought building GUI app on Windows must be easy right, as must be libs/frameworks already available to support that? It's just not.
It obviously varies a lot by the preferred languages, but Windows is still at the top, on average.
Turns out there are plenty of other jobs as programmers.
I worked at multiple FAANGs and can't see me or any of my colleagues capable of doing this.
You can build the most beautiful and fastest IDE, but with this bugs, it’s useless