Replies: 8 comments 4 replies
-
How do you build node and what is your computer configuration(how many core, memory) is? There is a lot of code in Node.js including the V8 runtime. I think the mainly cost is from v8. Build could be speed up by using Ninja. For more information, see Building Node.js with Ninja. Related issue: nodejs/help#3015 |
Beta Was this translation helpful? Give feedback.
-
ccache is what we use in the Node.js CI to speed things up as well. |
Beta Was this translation helpful? Give feedback.
-
That's pretty much the reason. ICU and openssl aren't exactly lightweight either but V8 is the big one. It's very header file and template heavy, meaning the compiler has to parse and analyze 10,000s lines of C++ code again, and again, and again... At one time V8 supported jumbo/unity builds (#18742) that compiled much faster than regular builds (but needed lots of memory) but maintaining that was a ton of work, so they eventually dropped it. |
Beta Was this translation helpful? Give feedback.
-
I am trying to build NodeJS on a G5, since yesterday :) |
Beta Was this translation helpful? Give feedback.
-
I've spent 6 hours building it and it's not done yet, in a virtual machine. |
Beta Was this translation helpful? Give feedback.
-
I generated builds for node using default, ninja and ccache enabled, here is what I found: command used:
|
Beta Was this translation helpful? Give feedback.
-
I am trying to build it in Ubuntu 23.04 and its still building for over 3 hours. |
Beta Was this translation helpful? Give feedback.
-
Yeah somehow every version takes longer and longer to build..
|
Beta Was this translation helpful? Give feedback.
-
Building NodeJS seems to take in between 70-90 minutes.
Comparably things like OpenWRT that is a fully functioning Linux distro take the same amount of time.
Anyone have any input into why NodeJS takes so long to build?
Beta Was this translation helpful? Give feedback.
All reactions