4 ms·
I've used it on and off for the past 14 months, but I have little love for it. I know VSCode is more or less the industry standard. But coming from Sublime Code
by ogre_codes 6y ago
I've used it on and off for the past 14 months, but I have little love for it. I know VSCode is more or less the industry standard. But coming from Sublime Code, the performance of VSCode is pretty mediocre. On top of big memory demands, the Code Helper uses massive resources and about once every couple days ends up spinning out of control causing the CPU to cook and the fan to spin constantly until it's restarted.
I stuck with it until recently I found out how to configure VIM to do TypeScript code completion, refactoring, auto-imports, and goto definition. Every once in a while I pop into VSCode to refactor a file rename or some other little piece which I haven't figured out in VIM yet, but I don't miss the CPU and memory abuse a bit.
(Note: I suspect if I invested the same amount of time into Sublime, I'd have equally good results with fairly decent performance as well)
- candiddevmike 6y agoWhat did you settle on for you vim plugin? ALE, coc?
- ogre_codes 6y agoYes, that was my ultimate solution. I tried a different auto-complete plugin previously and it was disappointing which is the reason I've been on VSCode for so long.
- ogre_codes 6y agoFWIW, I found out about CoC on a recent thread here on HN. For out code base, having Jump to Definition and refactoring is more-or-less essential.
- 0x6c6f6c 6y agoDo you have your setup documented? I have been checking out Vim for TypeScript once a year or so and have not had complete luck, with plugins either requiring specific versions of Python and modules or just being unstable for the more advanced features.
- ogre_codes 6y agoI posted a little about it in another reply on this thread, I use ALE for JSLint/ Prettier integration and for Code Completion and quasi-IDE like features I use CoC. Configuring CoC is basically copy/ pasta into your .vimrc. It's pretty self-explanatory though so you can figure out what's going on. https://github.com/neoclide/coc.nvim https://github.com/neoclide/coc.nvim
- brundolf 6y ago> the Code Helper uses massive resources and about once every couple days ends up spinning out of control causing the CPU to cook and the fan to spin constantly until it's restarted What language are you working in? VSCode's user experience varies widely between languages/ecosystems. Its IDE features are driven by language servers, and most are written by third-parties, and some of them are great and some of them are terrible. TypeScript and Rust (if you're using rust-analyzer) are stellar. Python is okay. Flow (an alternate JavaScript type system) was terrible last time I checked, spinning the CPU and freezing up like you describe. Language servers run as a separate process (Code Helper, I believe) and can be as inefficient/leaky/resource-hungry as they want to be.
- ogre_codes 6y agoWe're straight TypeScript/ React. We have a pretty large codebase though which no doubt contributes to the issue. The thing is, VIM uses the same language server and (so far anyhow) doesn't melt down. It seems like the issue is in the Code Helper process itself.
- brundolf 6y agoI have heard of people running into issues with the file-search indexer taking a long time on extraordinarily large projects. The largest project I've used it on was in the thousands of files (excluding node_modules) and didn't have any issues. But I know there are much larger projects out there, so I can't speak to those.
- ogre_codes 6y agoWe're approaching 3000 source files in our repo so I'm not sure. That is the issue.
- brundolf 6y agoHere's a question: are you using git, and is node_modules ignored? I ask because I think VSCode (by default) leans on the gitignore to decide which files to index. If it's indexing node_modules for whatever reason, that could create some serious overhead. https://www.reddit.com/r/vscode/comments/fpfnle/is_there_a_way_to_make_indexing_faster_for_large/ https://www.reddit.com/r/vscode/comments/fpfnle/is_there_a_w...
- okareaman 6y agoSounds to me like you have underpowered hardware. I use it constantly for all kinds of tasks and the fan never even spins up. I haven't heard "spinning out of control causing the CPU to cook" anywhere else
- foepys 6y agoUnderpowered hardware for Electron apps runs giant IDEs for Java development with ten times the features just fine.
- delian66 6y agoWhich Java IDEs are these?
- okareaman 6y agoEclipse and Android Studio are both monster IDEs
- ogre_codes 6y agoAlso, while Intelij is better than Eclipse, it's a bit of a pig too. Not crazy bad like Eclipse was, but bloated enough.
- ogre_codes 6y ago> Sounds to me like you have underpowered hardware. It's a text editor. It should run fine on whatever hardware I have. In this case, it's a fairly modern 15" MacBook Pro so even a full featured IDE should be just fine.
- cambalache 6y agoIt has happened to me with some frequency. Sorry but I dont buy the under-powered hardware excuse when vim or Sublime perform great in the same computer. And for the record I really like VS Code, but I am not deluded.
- stormbrew 6y agovscode's remote mode is what pulled me away from sublime. There's just nothing like it in any other editor and it's becoming indispensable to my particular workflows. [just to preempt: for various reasons vim or emacs in a remote terminal do not meet my needs in the same ways]
- basicneo 6y agoCan you explain a bit more about the usecase remote supports?
- brylie 6y agoI think one use case would be working inside of a Docker container, locally or remote.
- bmitc 6y agoThe Remote - SSH extension allows you to run Visual Studio Code on whatever computer you want to run it on but then remotely connect to another computer such that your files are on the other computer, your code runs on the other computer, and the integrated terminal can run on the other computer. So it's like SSH on steriods, where your editor and IDE works, including all the extensions you'd expect. So for example, instead of going through the hassle of building Visual Studio Code on Raspberry Pi, where there's no official support, you can simply use the Remote - SSH extension to develop directly on the Raspbery Pi from a Windows computer. This really shines when the Linux machine you're connecting to is headless. The Remote - WSL extension allows the same thing but in a more direct way by connecting to a WSL installation on your Windows computer. https://code.visualstudio.com/docs/remote/remote-overview https://code.visualstudio.com/docs/remote/remote-overview This feature is also why I've recently been using Visual Studio Code more and more. I think something like Emacs, once you learn it and spend a huge amount of time on, would be more performant and snappy in the end, but Visual Studio Code has too many modern features and a rather frictionless configuration and extension experience that keeps me there.
- kilburn 6y agoI use vscode-ssh to offload the heavy work to my desktop when working from my laptop. The big deal is that vscode uses a client/server setup, where a "client" vscode instance runs on your machine and a "server" vscode instance runs on the remote one. Then they figured out how to make latency and/or network intermittencies a non-issue. The experience is basically the same as working locally, except the linter, language server, formatter, and compilation run on the server-side (and hence don't bog down my laptop in this case). Then there are quality-of-life touches, such as vscode offering to tunnel ports whenever you launch something in the integrated terminal that listens for connections. That is: let's say I run "python3 -m http.server" in the terminal within vscode (where I'm working on a remote project). The http server is launched on the remote machine, and I get a prompt asking me if I want to setup a 8080 (laptop) -> localhost:8080 (server) tunnel. I was an adept of Jetbrain's various IDEs (and smart completions are still better there for most languages), but vscode-remote works so well that it has won me over. Not long ago, a friend of mine was considering a new laptop. He was happy with his pixelbook in general, but working in the "c++ with lots of number-crunching" space the pixelbook wasn't cutting it. I gave him an account to my desktop machine to let him try, and he's now a happy owner of a nice workstation for much less than what the laptops he was considering cost. Important point: my desktop uses a residential connection in Spain, and he's in the US. He had 0 issues with latency whatsoever (and I can attest the connection itself does have such problems).
- alexdima 6y agoHi, I'm a developer on VS Code and wanted to clarify that there was actually a logical memory leak in there. The problem is that I tried to reproduce it back in October while running from sources, and I could not reproduce any leak. I believed the issue is about the memory usage reported by the OS vs the memory usage reported by the logical JS Heap Snapshot, which is a common topic for garbage collected runtimes, such as JS / v8. That is why we believed the issue is about the v8 VM not freeing memory back to the OS when we freed memory logically. But it turns out I tried the steps again just now, and there is a real memory leak in there! It only reproduces when running a built version of VS Code, such as VS Code Insiders or VS Code Stable. The built versions of VS Code offer file type extension recommendations, for example you open a `.php` file and a recommendation comes in to point you to the PHP extension. When running out of sources, those recommendations do not show up and the entire code responsible for those does not execute. Thank you for bringing this up to my attention and I'm sorry for misunderstanding the initial issue.