Settings

Theme

Ask HN: Building a fast PC for development (JS)

2 points by ivanyv 4 years ago · 5 comments · 1 min read


I've been pondering building a dedicated server for my development work.

Building a Vue app on my Windows laptop (i7-9750H 64GB RAM) takes ~35s in WSL. I wanted to see if I could improve that down to 10s or so. So I spun up some test cloud machines, including a DO droplet with 64 GB of RAM, 32 CPUs, and two SSDs, running Ubuntu 20.04.

Time on that machine: ~23s

Given how expensive that server is, I'm not hopeful, and it's a shameful state of software development ecosystems if you ask me... but I digress. Does anyone have any recommendations on what an optimized build system would look like?

esperent 4 years ago

> Building a Vue app on my Windows laptop (i7-9750H 64GB RAM) takes ~35s in WSL

I would look into improving your build before buying new hardware. I'm not at all familiar with Vue but I have been working on a large monorepo based on NW which contains 5 large Angular projects and one large React project (not my choice to combine them).

The initial build probably take 20s but subsequent changes take <1s to the point that HMR feels instant. My laptop specs are similar to yours except only 16gb ram. This is a large Typescript project so I cannot understand what kind of monster would take 32s for incremental builds. There's probably some major improvements to be gained by updating the build (e.g. switch to ESBuild).

  • ivanyvOP 4 years ago

    Thanks, I didn't know about esbuild. I do not look forward to trying a different build system, but might be worth it.

duped 4 years ago

Throwing hardware at performance problems is a fallacy most of the time. At least when you have the knobs to turn at your disposal, like in software development.

Benchmark your build to understand why it's slow. The first thing that jumps out to me is you're using WSL which has non negligible penalties in a few cases. Have you tried dual booting into Linux and running everything natively?

Once you do: benchmark!

It sounds like hardware isn't the problem here, but your tool chain. I don't know enough about it to give insight but it's worthwhile analyzing and googling to see what is taking so long and how to make it faster.

  • ivanyvOP 4 years ago

    Hi, as I mentioned, I tried building under Ubuntu, which didn't improve build time that much considering the hardware specs, IMHO. So it does point out to optimizing the build itself, as esperent also suggested.

gabelschlager 4 years ago

Try building outside WSL. I had the same problem, but moving the app to standard Windows improved the startup times from ~30s down to ~10s. Never bothered figuring out what caused the differences.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection