In my Node-RED flow, I'm noticing that the execution seems to happen faster than what is shown in the UI, such as in the debug panel or flow dashboard. For example, in a delay node, the counter seems to count up to the maximum value first, and only then starts counting down. Similarly, in a semaphore node, it seems like the flow executes faster than the semaphore or counter values are updated in the UI.
Are there any known issues or limitations around flow execution speed vs. visual updates in Node-RED? If so, are there best practices to ensure that the UI/debug output reflects real-time flow execution more accurately?
Thanks in advance!
[
{
"id": "126579a8ffc1a561",
"type": "tab",
"label": "Flow 2",
"disabled": false,
"info": "",
"env": []
},
{
"id": "a7473374bbbf2b69",
"type": "inject",
"z": "126579a8ffc1a561",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 200,
"y": 140,
"wires": [
[
"13c16fc29acfe07b"
]
]
},
{
"id": "a5a1f48989e4919d",
"type": "delay",
"z": "126579a8ffc1a561",
"name": "",
"pauseType": "delay",
"timeout": "2",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 540,
"y": 240,
"wires": [
[
"060ce61290c094cb"
]
]
},
{
"id": "060ce61290c094cb",
"type": "debug",
"z": "126579a8ffc1a561",
"name": "debug 301",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 850,
"y": 240,
"wires": []
},
{
"id": "13c16fc29acfe07b",
"type": "function",
"z": "126579a8ffc1a561",
"name": "function 87",
"func": "// Create an array to hold the messages\nlet messages = [];\n\n// Loop 1000 times to generate messages\nfor (let i = 0; i < 10000; i++) {\n // Create a message with a payload\n let msg = {\n payload: `Message number: ${i + 1}`\n };\n\n // Add the message to the array\n messages.push({ ...msg });\n}\n\n// Return the array of messages, which sends all at once\nreturn [messages];\n",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 310,
"y": 240,
"wires": [
[
"a5a1f48989e4919d"
]
]
}
]