top | item 45599507

(no title)

timfsu | 4 months ago

Unfortunately, I tried to use zed as my daily driver, but the typescript experience was subpar. While the editor itself was snappy, LSP actions like "jump to declaration" were incredibly slow on our codebase compared to VS Code / Cursor.

discuss

order

0x696C6961|4 months ago

That doesn't make sense, they both use tsserver under the hood.

brundolf|4 months ago

I've heard that VSCode gets some special treatment and integrations with the typescript server that go deeper than normal LSP

antmarti|4 months ago

As the owner of a somewhat popular language, I checked to see if there's an extension available (there is!) as we publish a language server.

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...

foobarbaz33|4 months ago

You could have an lsp server of infinite speed, but that wouldn't help one bit if the bottleneck is how the client deals with the messaging.

The specific techniques used to send, receive, and parse JSON could matter.

rs186|4 months ago

VSCode's TypeScript service does not currently use LSP, and many language queries run in the same thread as the extension (or "Extension Host"). That does not necessarily explain the performance difference though

brundolf|4 months ago

I had the same experience and the same outcome. Zed was super fast for editing but slow for rich features, which on the net slowed me down compared with VSCode

adhamsalama|4 months ago

Electron compiles NodeJS with v8's pointer compression which leads to an up to 50% decrease in memory usage, and might speed it up too.

davidatbu|4 months ago

Are you saying that VSCode runs tsserver in its own NodeJS process? Or are you saying that VSCode uses the NodeJS it ships to run tsserver in a different process?