Skip to contentSkip to conversation

Improving NPM recipe build speed

DISCUSSION Alessandro Tagliapietra 2 participants 4 messages Apr 26, 2021 – May 11, 2021

lore
Share & tools
lore
#0 lore raw

Hi everyone,

I'm making an image that includes the node-red recipe from meta-iot-cloud.
The whole process takes about 30+ minutes for that recipe alone (most of the time spent in do_configure).
Now I want to override the recipe systemd service file and create a nodered user. Every time I change my bbappend file I have to wait 30+ minutes to have the result even for a small systemd file change.

Is it possible to speed up the process somehow?

Thanks in advance

#2 lore raw
In reply to Alessandro Tagliapietra
Quoted 1 line · Alessandro Tagliapietra

Hi everyone,

Hi Alessandro,

Quoted 10 lines

I'm making an image that includes the node-red recipe from meta-iot- cloud.
The whole process takes about 30+ minutes for that recipe alone (most of the time spent in do_configure).
Now I want to override the recipe systemd service file and create a nodered user. Every time I change my bbappend file I have to wait 30+ minutes to have the result even for a small systemd file change.

Is it possible to speed up the process somehow?

I never worked with node-red in yocto, so I can't speak specifically for that, but I encountered similar situations before. Here is what I usually do when I need to change a file in a recipe that takes a really long time to compile or triggers a rebuild of a ton of other recipes.

This only works for files that don't need to be compiled, like configuration files, systemd service files, udev rules etc. I usually replace the file in the rootfs directly on the device (or boot from NFS and edit the file in the NFS export). For example if I need to change a systemd service file, I change the file on my host, copy it with scp to the device and check if everything is working as expected. When I'm finished, I reintegrate my edits with a bbappend file and check again if it works.

Quoted 1 line

Thanks in advance

#3 lore raw

Hi Nicolas,

Thank you for the advice, that would work for files outside the npm packages!

Hopefully there's a way to improve npm install speed too, I was hoping there was a way to just run npm install instead of going through the yocto npm process (which takes 30 mins vs < 1 min that npm takesi

--
Alessandro Tagliapietra

Quoted 33 lines · Nicolas Jeker
Quoted 1 line · Alessandro Tagliapietra

Hi everyone,

Hi Alessandro,

Quoted 10 lines

I'm making an image that includes the node-red recipe from meta-iot- cloud.
The whole process takes about 30+ minutes for that recipe alone (most of the time spent in do_configure).
Now I want to override the recipe systemd service file and create a nodered user. Every time I change my bbappend file I have to wait 30+ minutes to have the result even for a small systemd file change.

Is it possible to speed up the process somehow?

I never worked with node-red in yocto, so I can't speak specifically for that, but I encountered similar situations before. Here is what I usually do when I need to change a file in a recipe that takes a really long time to compile or triggers a rebuild of a ton of other recipes.

This only works for files that don't need to be compiled, like configuration files, systemd service files, udev rules etc. I usually replace the file in the rootfs directly on the device (or boot from NFS and edit the file in the NFS export). For example if I need to change a systemd service file, I change the file on my host, copy it with scp to the device and check if everything is working as expected. When I'm finished, I reintegrate my edits with a bbappend file and check again if it works.

Quoted 1 line

Thanks in advance