I am suspecting that the messages in the debug window (from the debug node) are coming slow. To test this, I made a simple python counter. The output in the terminal is very fast, while in the debug window it arrives with a delay of 1-1.5 seconds. As I am using those messages to trigger events, everything is slowed down.
this is my main block:
The link-out node is connected to a sort of 50-60 different flows. Could they be too much?
Not really using the "debug" window, but as you can see from the sketch in my post, I have a link-out node connected to other 50 flows. The debug window is displaying messages very slow, and they are delivered slow to the other flows.
The browser is running on another machine and the processor (Raspi) has a load average of 0.5, very low.
Is the browser running in the same machine as node-red?
Don´t forget that the editor uses a WebSocket connection to get messages from the runtime. If the runtime is not in the same machine of the editor then it is normal that there will be a delay (messages over websockets). The messages you get in the console are not using websockets. If this is a system in production you should consider if the debug nodes should be there.
The debug window is the only mean I have to check if correct messages are flowing in the BUS.
The main flow of this project is monitoring a automation bus and then 50 flows are analyzing the result for each message, taking the right action if requested. The debug window gives me a sort of feedback.
I will make the "remove wire" test asap (now the system is in production). Data is sent at variable speed, from 10 frames/second to 1 each 10 seconds..
Yes. It is very fast. So the problem is related to the link towards the other 50 flows, each of one starting with a switch node to intercept its related frame. I'm out of ideas now.
The flows are intercepting a frame and use it to trigger automation (lights/scenarios/blinds/curtains/etc..) Many of them are complex as they are sending status queries.
It's not easy to answer to some of your question....
The frame is short (from 6 to 10 characters).
Sending a query can be "ask to the burglar alarm which is its status, and wait for 10 frames as an answer for all zones" or maybe "check the status of the window contact"
Used nodes are mainly switch, change and tcp request (to send messages). Few (but simple) custom functions.