Node-Red editor running very quick on Windows - Very slow on Raspberry Pi - Why?

The exact same json file runs very quick on my Windows PC, but very slow on the Raspberry Pi. The flow is quite large spread over many tabs, and I am using Dashboard as well.

When I say quick, I mean when I am in the editor I click on a tab it will instantly change on Windows, but might take 5-10 seconds to open on the PI. Copy and paste of nodes very slow, opening a node to edit is slow, everything is slooooow.

Its a 4Gb CM4. Running "free -m" shows I have 3838 total Mem, 762 used, 2477 free, 95 shared, 598 buff, 2872 available so seems to have plenty of memory available.

Any ideas? Thanks

Yes, even a rubbish windows pc is multiple times faster than RPI

Also, are you running the browser on the PI or the desktop? (Hint, just because node-red runs on a PI doesn't mean you have to access the node-red editor on the PI)

Also, are you doing node, flow or full deploy?

Further reading

Beyond the world of single-board computers, the Pi 4's performance in that test is about as fast as a decent 2007-era Intel Core 2 processor. It's six times slower than our reference AMD Ryzen 5 1600 based desktop PC. But then again, that AMD CPU alone costs three times as much as the whole Pi 4.

1 Like

Full deploy - I dont mind that being slower.

Interesting comment on the processor. I would not have though that just clicking on a node to open it, trying to move it or moving between tabs would be so CPU intensive. Sometimes I literally can't get it to open a node by double clicking it, I need to highlight it then press enter to open it.

The browser is on the Pi. I edit the nodes on the Pi mostly, the deploy is on the Pi.

A browser is a beast of a program. The PI is relatively decent for computational (runtime) stuff but it is the GUI and BROWSER running on the same machine - coupled with full deploy that is your enemy here.

In short, I don't even run a GUI on my PI - only SSH access. The browser to access the PIs node-red is on another device.

1 Like

If there is one thing my WIndows laptop can do better than a Raspberry Pi, It's run a browser. (there may be others)
Contrariwise, Node-red on windows seems difficult and awkward compared to the Pi.

So I run Node-red on the Pi and access it from Firefox on Windows

1 Like

I need the GUI running on Chromium, I am running a dashboard with a touchscreen.

Why does pressing the full deploy make a difference - I dont understand this.

I have SSH turned off.

So sounds like I am out of luck?

Lets say you have 500 nodes in all your flows/tabs. Then you add 1 more, edit 1 and remove 3 - you have made 5 changes.

  • full deploy - destroys all 500 modes, closes any open connections (mqtt, TCP, modbus, etc), then rebuilds them completely and then deploys them to the runtime at which point they need to re-connect to any services or transports they use.
  • flow deploy - finds and destroys all connected (by wire) nodes in the flows that were wired upstream or downstream to the modified nodes.
  • node deploy - just destroys/closes/re-creates the 5 nodes you changed.

NOTE: Each time nodes are torn down & rebuilt, there is a slight chance of a resources or mem block being locked (leakage). The less nodes re-created, the less opportunities.

So 20 modifications of 5 nodes =

  • Full Deploy: 10000 nodes destroyed, disconnected, rebuilt, redeployed
  • Node Deploy: 100 nodes destroyed, disconnected, rebuilt, redeployed

The numbers get big quick

In order to confirm whether it is the browser clogging up the pi, try running the browser on the pc, accessing node red on the pi.

And closing / killing the browser on the PI while you do so.

Sorry, might be a bit slow, how do I use the browser on my PC to make changes to a Node-Red file on the Pi?

You just need the IP address of the Node-red machine.
Point your browser to the IP address and port 1880.

So on my network there is a Raspberry Pi running Node-red at 192.168.1.11. My browser points to 192.168.1.11:1880.
The dashboard is at 192.168.1.11:1880/ui

Yes, okay, I have viewed the dashboard this way before, I can't believe I didn't think to access the editor this way. It is so fast now, my quality of life has increased 1000%. Thanks all!

3 Likes

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