-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Typescript server is slow on Zed when compared to VSCode #18698
Comments
Could you also record a comparison with Neovim + VTSLS? VSC uses tsserver directly. |
CleanShot.2024-10-03.at.19.57.36.mp4LazyVim distro with that lsp config override: return {
"neovim/nvim-lspconfig",
opts = function(_, opts)
opts.inlay_hints.enabled = false
opts.servers.vtsls.settings.typescript.tsserver = {
experimental = {
enableProjectDiagnostics = false,
},
}
opts.servers.vtsls.autoUseWorkspaceTsdk = true
return opts
end,
} |
But as you can see in Zed, I'm hovering my mouse over the |
Same issue here, I'm running zed on fedora linux |
Been facing the same issue for the past few months. The only workaround right now is to restart the LSPs once in a while. |
I found this PR from vtsls. It seems Electron came with an unofficial Node version that came with pointer compression, which is also what VSCode is using. I played with it for a while. It does seem like the memory is relatively smaller, but I haven't really started coding with it. Screen.Recording.2024-11-07.at.9.49.32.PM.mov[UPDATE] After trying to open files from at least 10 different sub-repos, I can see the tsserver memory usage cut nearly half, from 3GB~ down to 1GB~. |
I'm not sure if this is good enough to reproduce the problem, but if you have a really large monorepo, try opening multiple files from multiple different sub-repos, and you will start noticing that the node memory usage will start to build up, which I think tsserver will likely get slow and unusable like the issue described. |
Also happening for me |
I wanted to give it another shot. New Zed install, dumb example but it's like this everywhere: CleanShot.2025-02-23.at.16.29.02.mp4Compared with Cursor (or VSCode): CleanShot.2025-02-23.at.16.29.24.mp4Guys... How is it not a priority? The reproduction is dead simple. Too bad Zed is so fast but the LSP refresh is total garbage?? @osiewicz, did you manage to reproduce? Clone this https://github.com/baptisteArno/typebot.io (or any non-toy typescript project) |
Further discussion / debugging here: https://discord.com/channels/869392257814519848/873293828805771284/1343251336778743940 |
ok, i found what was wrong in my case, zed's default memory limit is different for vtsls and typescript-language-server
I'd offer that we set vtsls memory limit same as typescript-language-server |
Interesting, I always though that Zed default the vtsls max memory to 8092, but it doesn't seems to be the case according to your PR🤔 [EDIT] |
then
then i actually not sure what and where went wrong 😵💫, bc i tested locally and performance on my repo become great after i edited settings. And that worked in both cases: when it set as defaults in zed and when i edit settings |
Based on my experience, I don't think memory is the problem here, where one of my monorepos(about 20+ sub-repos) always uses about 5GB at max, which it doesn't even hit the VTSL server max memory. And there is no problem with inspect types, go to definition, etc., not until I start changing some code, where the LSP will slowly fall apart. |
Memory is not the issue. On nvim with vtsls with default memory limit (4Go), there is no issue. |
maybe my issue was not related from the beginning 😅 |
Check for existing issues
Describe the bug / provide steps to reproduce it
The coding experience in a large Typescript monorepo (https://github.com/baptisteArno/typebot.io) is still an issue for me even though it now uses the vtsls, I still don't get the same speed as VSCode or even NeoVim (with vtsls lsp)
I'm just helpless, what is doing Zed that could cause this code error refresh so slow?
This also can be linked with:
Environment
Zed: v0.156.0 (Zed Preview)
OS: macOS 15.0.0
Memory: 16 GiB
Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
VSCode:
CleanShot.2024-10-03.at.17.02.42.mp4
Zed:
CleanShot.2024-10-03.at.17.04.27.mp4
If applicable, attach your Zed.log file to this issue.
No response
The text was updated successfully, but these errors were encountered: