Loading palette nodes too SLOW

Node-Red Version
4.0.2
Node Version
V18.20.4
Electron Version
No response
Platform
windows11 WSL-Linux 5.15.153 ubuntu
Architecture
x64

Sorry to bother everyone, but when running node red using WSL on Windows 11, it takes a long time to load Palette nodes. It usually takes more than 30 seconds. I searched on Google and forums but couldn't find the answer.

3 seconds

Running Ubuntu in WSL on Win 11, i7 CPU, 32GB RAM

23 Sep 10:24:10 - [info] Node-RED version: v4.0.2
23 Sep 10:24:10 - [info] Node.js  version: v18.19.0
23 Sep 10:24:10 - [info] Linux 5.15.133.1-microsoft-standard-WSL2 x64 LE
23 Sep 10:24:10 - [info] Loading palette nodes
23 Sep 10:24:13 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
23 Sep 10:24:13 - [info] Settings file  : /home/steve/.node-red/settings.js
23 Sep 10:24:13 - [info] Context store  : 'default' [module=memory]
23 Sep 10:24:13 - [info] User directory : /home/steve/.node-red
23 Sep 10:24:13 - [warn] Projects disabled : editorTheme.projects.enabled=false
23 Sep 10:24:13 - [info] Flows file     : /home/steve/.node-red/flows.json
23 Sep 10:24:13 - [info] Server now running at http://127.0.0.1:1880/
23 Sep 10:24:13 - [info] Starting flows
23 Sep 10:24:13 - [error] [function:98f08d7278d87334] Error: Cannot find module '/home/steve/.node-red/node_modules/csv_by_rfc/index.js'. Please verify that the package.json has a valid "main" entry
23 Sep 10:24:13 - [info] Started flows

I have 15 dependancies in /home/steve/.node-red/package.json

  • show us what is in /home/xty18/.node-red/package.json
    • cat /home/xty18/.node-red/package.json
  • How much memory does your computer have
  • Is your CPU usage high?
    • before launching node-red?
    • while launching node-red?

Also, if you set the log level to Trace in settings.js then I think you may see what is taking the time.

@Steve-Mcl @Colin
Thank you for your replies. Forgive me for being a beginner.
package.json content:

{
    "name": "node-red-project",
    "description": "A Node-RED Project",
    "version": "0.0.1",
    "private": true,
    "dependencies": {
        "CJT188XT": "file:CJT188XT",
        "DLT645_1997": "file:DLT645_1997",
        "DLT645_2007": "file:DLT645_2007",
        "DLT698": "file:DLT698",
        "LXB3E": "file:LXB3E",
        "Modbus_sia": "file:Modbus_sia",
        "node-red-dashboard": "^3.6.5",
        "serialport": "^12.0.0"
    }
}

Before running Node-Red,pic


Loading Node-Red,pic

Running Node-Red pic

Loading log(Trace is ON , level: "trace")

xty19@1:/mnt/c/Users/xty19$ node-red
24 Sep 08:40:47 - [info]

Welcome to Node-RED
===================

24 Sep 08:40:47 - [info] Node-RED version: v4.0.2
24 Sep 08:40:47 - [info] Node.js  version: v18.20.4
24 Sep 08:40:47 - [info] Linux 5.15.153.1-microsoft-standard-WSL2 x64 LE
24 Sep 08:40:47 - [info] Loading palette nodes
24 Sep 08:40:57 - [debug] Module: node-red-dashboard 3.6.5 /home/xty19/.node-red/node_modules/node-red-dashboard
24 Sep 08:41:04 - [info] Dashboard version 3.6.5 started at /ui
24 Sep 08:41:07 - [info] Settings file  : /home/xty19/.node-red/settings.js
24 Sep 08:41:07 - [info] Context store  : 'default' [module=memory]
24 Sep 08:41:07 - [info] User directory : /home/xty19/.node-red
24 Sep 08:41:07 - [warn] Projects disabled : editorTheme.projects.enabled=false
24 Sep 08:41:07 - [info] Flows file     : /home/xty19/.node-red/flows.json
24 Sep 08:41:07 - [info] Server now running at http://127.0.0.1:1880/
24 Sep 08:41:07 - [debug] loaded flow revision: a74a388459cbf23c57da5272550b45b6af1f26c78c7fefde1a0be451e0ee8ec4
24 Sep 08:41:07 - [debug] red/runtime/nodes/credentials.load : no user key present
24 Sep 08:41:07 - [debug] red/runtime/nodes/credentials.load : using default key
24 Sep 08:41:07 - [debug] red/runtime/nodes/credentials.load : keyType=system
24 Sep 08:41:07 - [warn]

---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------

24 Sep 08:41:07 - [trace] runtime event: {"id":"runtime-state","retain":true}
24 Sep 08:41:07 - [trace] runtime event: {"id":"runtime-deploy","payload":{"revision":"a74a388459cbf23c57da5272550b45b6af1f26c78c7fefde1a0be451e0ee8ec4"},"retain":true}
24 Sep 08:41:07 - [info] Starting flows
24 Sep 08:41:07 - [debug] red/nodes/flows.start : starting flow : global
24 Sep 08:41:07 - [debug] red/nodes/flows.start : starting flow : a0f0c8eee142d6cf
24 Sep 08:41:07 - [trace] [flow:global] start flow [global]
24 Sep 08:41:07 - [trace] [flow:global] ------------------|--------------|-----------------
24 Sep 08:41:07 - [trace] [flow:global]  id               | type         | alias
24 Sep 08:41:07 - [trace] [flow:global] ------------------|--------------|-----------------
24 Sep 08:41:07 - [trace] [flow:global]  91521aab46f9f66e | ui_tab       |
24 Sep 08:41:07 - [trace] [flow:global]  5b134c308fbf0158 | ui_base      |
24 Sep 08:41:07 - [trace] [flow:global]  3f70891b181aa22c | ui_group     |
24 Sep 08:41:07 - [trace] [flow:global] ------------------|--------------|-----------------
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf] start flow [a0f0c8eee142d6cf]
24 Sep 08:41:07 - [debug] [flow:a0f0c8eee142d6cf] not starting disabled node : 03284146ab713ffb
24 Sep 08:41:07 - [debug] [flow:a0f0c8eee142d6cf] not starting disabled node : 9645caf5e9d91f78
24 Sep 08:41:07 - [debug] [flow:a0f0c8eee142d6cf] not starting disabled node : 2d30f0744bb9d381
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf] ------------------|--------------|-----------------
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  id               | type         | alias
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf] ------------------|--------------|-----------------
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  5acdbcbc0f406c77 | ui_spacer    |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  bae84d9215505dae | ui_spacer    |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  3ed8b680b7f464e5 | ui_spacer    |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  caab3563f8203c27 | ui_spacer    |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  74dcdbedf5c3b83e | ui_spacer    |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  5ab535df59dcbb10 | inject       |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  572fd3ec4786d583 | ui_dropdown  |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  403b9a54da54bae5 | ui_form      |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  8ecfa0b59e7ee7dd | function     |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  60121bf7dee72cae | ui_button    |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  f56d8f40cbc7853f | function     |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  e219ade8583e6269 | function     |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  6bfc9a03180dd9e6 | ui_dropdown  |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  d26237f3af1d4387 | function     |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  ae5b71dc440b96c8 | ui_dropdown  |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  c5f6285ade8ae6f9 | function     |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  5bf4e66d2e439f7a | ui_slider    |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  c96c067a6fe6a1b8 | function     |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  c291c521b2afb0a1 | ui_dropdown  |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  cae8bd6b5e53e139 | switch       |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  15ded60ba3be34ee | function     |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  add47787bb459e0e | function     |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  21a0667ac618436b | ui_toast     |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  e1acafa00e372eec | function     |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  eee229191828af5c | function     |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  299e2a9afbbe7343 | function     |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  1f452ab39aecbfd2 | function     |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  5c55ecdc8c3bdf01 | function     |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  77e7f2fd86b6ae8f | function     |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  2607621b96a49146 | function     |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  c05c715e3bf29256 | function     |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  1c5982dd7c2c6bc5 | ui_slider    |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  621d01f434042037 | function     |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  ea7f1638b4e8305f | ui_button    |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  e60fafbbd3bb7bd3 | function     |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  f739a98daf5bba40 | comment      |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  38a9c8f25e4158a6 | function     |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  e7647eea92bb6fb5 | function     |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf]  9d8de0c2e17f8f4e | function     |
24 Sep 08:41:07 - [trace] [flow:a0f0c8eee142d6cf] ------------------|--------------|-----------------
24 Sep 08:41:07 - [trace] runtime event: {"id":"runtime-state","payload":{"state":"start"},"retain":true}
24 Sep 08:41:07 - [info] Started flows
24 Sep 08:41:07 - [warn] [function:获取串口] @@@串口参数 paths:[
      "/dev/ttyS0",
      "/dev/ttyS1",
      "/dev/ttyS2",
      "/dev/ttyS3"
]
^A

these are quite odd. I would bet money that one or all of these are responsible for the slow loading.

Did you add these yourself? Have you ever opened your firewall/router to permit in-bound connection to your Node-RED? Is your Node-RED secured?

The last one Modbus_sia suggests you are trying to work with Modbus stuff? There are installable nodes designed for modbus (open the palette manager and search for node-red-contrib-modbus).

Thank you for your reply.
These are all packages that I have customized and developed myself. Thank you for the prompt. I will comment out these packages and observe the loading time.
What do security issues refer to? How to adjust security issues since the operating environment is WSN and the host is Win11?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.