Best hardware for Deno development?
I am looking for a new laptop / desktop for Deno development as my current setup seems no longer viable (to my big surprise). I have ThinkPad X1 with Intel Core i7 CPU @ 2.40GHz, 8GB RAM, fast SSD drive and Windows 10 Pro. I am using VS Code for development, and even if I just run one instance of VS Code and Chrome alongside it (e.g. to develop Fresh apps), I am hitting memory and CPU limits and the developer experience is terrible, as the LSP responses lag significantly. I have the system pretty optimized and do not have any bloatware installed that could negatively affect the available resources, yet the development of Deno apps is not great. With every change in code, the CPU consumption skyrockets and the whole VS Code feels laggy for a couple of seconds. My system is pretty old, but still the specs are not that bad, considering that I am just building lightweight apps. I've also used the same system for Android, .NET and Node.js development in the past without issues.
I do not have a preference regarding OS, I have worked with Win/Mac/Linux in the past. What I want is a machine that will allow me to have snappy auto-complete in VS Code and will not force me to constantly keep an eye on memory and CPU consumption. What would you recommend? Budget is of no concern, I really just want the best tool. Thank you!
5 Replies
Sounds like a software / configuration problem. Your hw setup seems completely fine and your problems probably not solvable by throwing more hardware at it. I code with similar-ish X1 laptop and it's fine. I did change from Win10 to Linux Mint though, and got much better experience performance-wise and with overall DX, although I would think your problems stem from something else.
Like, do you have some big cache directory, node_modules folder or something else in the workspace that the LSP keeps analyzing? Some user recently had problems with VSCode + LSP, and it turned out to be some build script that was regularly creating and updating hundreds of files that were throwing off the LSP.
Not trying to push linux, just sharing my experience: On Windows it was that if any process (usually chrome or, to a lesser extent, firefox) started doing something CPU heavy that completely saturates ONE of the 4 cores, on Windows the whole system becomes unresponsive (same with any software going on full blast). Linux tends to stay usable and snappy unless ALL of the cores are doing intensive work. Other bonuses: Deno seems to have Windows specific bugs every now and then, seems like most of the core devs are not using Windows so less of the issues get caught early. Also it's nice to develop on the same OS as the servers that the apps eventually are going to run on.
Thank you for sharing your experience. I was thinking about switching to Linux on my current hardware, I will give it a shot. I tried to investigate why there are the lags, but to no avail. My workspace is pretty straightforward, the project is not too big, there is no node_modules, I am using only deno dependencies (no npm). I do have some complex TypeScript stuff going on, but at the same time we're talking only about few thousand lines of code. I would expect that my machine would handle that.
@raunioroo Why did you choose Linux Mint? Did you consider any other distros?
I had little bit of prior experience with Debian & Ubuntu (a long time ago), so wanted something based on those, but last time I tried Ubuntu (also a long time ago) I didn't like many of the decisions they had made or the directions they took. Seemed like Mint takes what is good in Ubuntu and fixes all the things I hated about Ubuntu, has served me well for a year or so now. Flatpak fixes a lot of issues I had with Linux in general, so I rarely have to dual boot anymore, mostly thanks to flatpak having recent versions of many apps I like to use (although I try to stay with system packages whenever possible).
I didn't try many distros though, after a couple of years of using windows only, tried Mint, loved it and haven't really felt the need to try anything else
Got curious, here's stats from my main VSCode workspace. 250K+ non-comment, non-blank lines of JS (not a single line of TS haha)
![No description](https://cdn.answeroverflow.com/1173987844713357392/image.png)
BTW We should give more attention to Windows. Many windows users have been facing issues when installing Deno on Windows