Node-Red Ridiculously Slow

Hi All,

We have a rather large Node-Red flow that does a variety of tasks but they are all pretty simple. Node-Red is running on our HMI which is running Ubuntu. It pulls data in from an OPC database on the PLC, parses it out, and sends to our cloud API. We also occasionally send some data to an external MongoDB, as well as pull data in from the cloud or from the MongoDB. Keep in mind we are not using the dashboard feature of Node-Red

The main issue here is that nowadays, when navigating through the flows, moving nodes, deleting flows, putting debug nodes in, changing flows, etc. it gets so insanely slow that the "Page Unresponsive" dialogue comes up. (See screenshot). This happens and stays like this for a solid 2 minutes and sometimes up to 10 minutes. Making any change in here is painful. I have attached my flow and would appreciate it immensely if someone could point out what we are doing wrong.

Thanks!

BGX_NODE-RED_12-29_MONGO.json (2.0 MB)

Your flow contains 8100+ configuration nodes, I am not surprised.
They are all similar to:

 {
        "id": "c23fa328ec9b7223",
        "type": "OpcUa-Endpoint",
        "endpoint": "opc.tcp://192.168.0.1:4840",
        "secpol": "None",
        "secmode": "None",
        "login": false
    },

Don't you need only a single OpcUa-Endpoint node ?

Yes we do only need one OPCUA endpoint node. Those are all old unused ones, we do in fact only use one configuration and back when we weren't too well versed in Node-Red we let them compound up and on every new flow we implement they seem to add up. If they are unused would this still cause issues? I have yet to find a mass delete option for those unused config nodes...

I think that the editor loads (renders) all configuration nodes when you open the webpage even if they are not directly visible. adding 8100+ DOM elements in the browser, computer will suffer :wink:

You can open the flows.json file in an editor like vs code (make a backup), and delete all the unused objects, they are not linked, should be relatively easy, save, restart node-red.

3 Likes

Thank you very much :pray:
Much appreciated. That helped improve it greatly.

2 Likes

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