[nodejs] Node is insanely slow on ARMv6

Problems with packages? Post here, using [tags] of the package name.

[nodejs] Node is insanely slow on ARMv6

Postby peoro » Sat Nov 11, 2017 4:59 am

Node.js (installed by `nodejs 8.8.1-1` ) takes ages to start on my ARMv6 (Raspberry Pi Zero W): more than 7 seconds to run an empty script.
Code: Select all
$ time node -e ''
real    0m7.996s
user    0m6.750s
sys     0m0.170s


I tried to download the binaries for ARMv6 from the Node.js website (version v9.1.0, as the file seems to be missing for the 8.x.x branch), and they perform so much better!
Code: Select all
$ bin/node -v
v9.1.0
$ time bin/node -e ''
real    0m1.290s
user    0m1.160s
sys     0m0.060s


`community/nodejs-lts-boron 6.11.5-1` has a similar performance to the binary downloaded mainstream, while `community/nodejs-lts-argon` is somewhere inbetween (it takes about 2~3 seconds to run an empty script).
peoro
 
Posts: 6
Joined: Sat Nov 11, 2017 4:53 am

Re: [nodejs] Node is insanely slow on ARMv6

Postby peoro » Sat Nov 11, 2017 5:05 am

I also own an Odroid-C2 (ARMv8), am running ALARM on that one as well, and just noticed that there's a similar issue.

Node packaged by ALARM (`community/nodejs 8.8.1-1`) is a lot slower than the mainstream binaries, both the 8.x.x and 9.x.x series:
Code: Select all
$ time node -e ''
real    0m1.825s
user    0m1.720s
sys     0m0.100s
$ time node-v8.9.1-linux-arm64/bin/node -e ''
real    0m0.268s
user    0m0.220s
sys     0m0.040s
$ time node-v9.1.0-linux-arm64/bin/node -e ''
real    0m0.266s
user    0m0.250s
sys     0m0.010s
peoro
 
Posts: 6
Joined: Sat Nov 11, 2017 4:53 am

Re: [nodejs] Node is insanely slow on ARMv6

Postby peoro » Sat Nov 11, 2017 3:40 pm

In case anybody else cares, I created an AUR package `nodejs-latest-bin` that installs the official binary release of nodejs and npm.

https://aur.archlinux.org/packages/nodejs-latest-bin/
peoro
 
Posts: 6
Joined: Sat Nov 11, 2017 4:53 am

Re: [nodejs] Node is insanely slow on ARMv6

Postby peoro » Sun Nov 12, 2017 9:22 pm

I opened an issue on the Github repository of node.

Somebody there suggested that it's the `--without-snapshot` option used to compile node that has the largest impact on startup times.

I noticed that the Arch Linux community/nodejs package doesn't use that option, while ALARM does.

Why is it used by Arch Linux ARM?
Can it be removed?
peoro
 
Posts: 6
Joined: Sat Nov 11, 2017 4:53 am

Re: [nodejs] Node is insanely slow on ARMv6

Postby WarheadsSE » Tue Nov 14, 2017 7:31 pm

It may be removable now. Snapshot broke the piss out of ARM a while back.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6729
Joined: Mon Oct 18, 2010 2:12 pm


Return to Packages

Who is online

Users browsing this forum: No registered users and 2 guests