-
Notifications
You must be signed in to change notification settings - Fork 29.1k
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
Node very slow since update from 16.17.1 to 16.18.0 #45202
Comments
There is no node v16.17.3. |
Using Node.js 16.8.0, what is your build time with npm 7.x? |
Sorry, it was 16.17.1. Changed in description. |
=> 85 minutes
==> 80 minutes
==> 247 minutes
==> 229 minutes Note that build time can depends on other factor (tasks, network and runner) so difference is not revelant when less than 15 minutes. |
What about v18.x? |
OK, so that would seem to eliminate Are you able to share the contents of your |
I launched a build with node 18.12.0. I will keep you updated. |
I have 4 applications built in my image: 2 backends (tsoa + node) an 2 front applications (ionic + angular). But, this is one of "package.json":
|
Is it at all possible the issue is caching? Is it possible only the first build takes that long after you update? Are all these builds on fresh operating system/device installations and so everything is an empty cache? |
Good track but all builds starts with an empty cache... |
All build is done in packer with solo.io arm plugin. |
Build with node 18 take time too.
Build has failed because my application is not yet compatible but it occurs after 175 minutes and other steps were expected to finish the job. |
Are we troubleshooting |
Are we troubleshooting npm install here or npm run build? 80 minutes is the build time for all (it includes 'npm install', 'node build' and others (os update & setup). I noticed that 'npm install' takes 15 minutes instead of 5 minutes. But node build is also taking more time. Is it possible that node does not detect properly the architecture and do not use prebuilt binaries? |
@nodejs/releasers @nodejs/build Any ideas as to what might be going on here or how to best troubleshoot? |
It would be helpful to see where time is spent! As suggested in the thread; removing network as a factor would provide relevant insight. What does for instance |
No followup, closing. |
Hello @Trott @jbergstroem @bnoordhuis , Sorry for my lately reply but I think we should reopen this issue. I can give you the step to reproduce it. Create a json file, packer-template.json with this:
It's a packer template that build a Linux server image for Raspberry built. Then run the build with:
What is interresting is that the last step: "npm install --global http-server". It takes arround 15s with my running environment (pc, network, ...) but takes arround 1 minute if I switch from Node 16.17.1 to Node 16.18.1 (in variables section). All my tests gave the same results, whatever the test environment configuration. I have a full project ready where we have "npm install" and "npm build" and both operation are significally longer (x3). |
If it's specifically npm that's slow, then the prime suspect is the upgrade from npm 8.15.1 to 8.19.2. npm is an external dependency so issues with it should be reported to them. Are you also seeing slowdowns with node itself? I mean after npm has done its thing and your app is up and running? |
Thanks for your reply. I will try to fix the npm version when I will be at the office. For the second point (performance at running time) I have to do a test because I didnt take care. I keep you updated. Thanks again |
Hello @bnoordhuis @Trott @jbergstroem , Definitly, it doesn't seem to be related to npm. With the packer tempate shared just above, I used the --preserve option of "n" to fix the npm-cli version. With node 16.17.1 => npm install http-server takes arround 20s I enabled verbosity. node_16_18_1_with_npm_8_15_0.txt You can look at it with meld or any other comparaison tool. Thanks again for your support ! |
But that's all while npm is running, right? My question was whether you're still seeing slowdowns afterwards, when npm is gone and your app is running. |
Hi @bnoordhuis |
I can see from your logs that npm downloads the same number of dependencies in all three cases but that for some reason it takes almost 4x as long with v16.18.1. I can't see why though. If you can profile it somehow, maybe we can identify the cause. |
Yes, it is what I noticed too. |
@bnoordhuis @Trott @jbergstroem With silly loglevel I didnt found anything more. But what is strange is that the time increase for all operation (not especially http fetch). As an example, this is the first logs with node 16.17.1: arm-image: The following command is longer with node 16.18.x that with node 16.17.1... Against those for node 16.18.1 (same with 16.18.0): arm-image: The following command is longer with node 16.18.x that with node 16.17.1... Please, could you reopen the issue ? However I will have to create a new one and we will loose history... |
Done, but as expectation management: don't expect anyone but yourself to investigate. There haven't been more reports like yours so it's likely something unique to your setup. |
There have been no other reports like this one and v16.x is end-of-life soon so I'll go ahead and close this. |
@JoranLive I'm wondering if the following issues may be relevant to you: I know the versions being mentioned here may be outside of the versions you were using and on different architectures, but, it seems other people are seeing performance regressions when comparing to v14. |
Version
16.18.0
Platform
Ununtu server 22.0.4 arm64 (packer + plugin arm)
Subsystem
No response
What steps will reproduce the bug?
I have a cicd that build a Raspberry Pi 4 image (with packer and solo.io packer arm plugin) that embbed a node applications.
My build was taking approximatively 1h but grows to 4h after update of node from 16.17.1 to 16.18.0.
Time for "npm install" is 3 times longer than with the previous version.
I use npm version 8.
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior?
No response
What do you see instead?
npm install and build is 4 times longer with node 16.18.0 than with node 16.17.1.
Additional information
No response
The text was updated successfully, but these errors were encountered: