This pull request optimizes the resource usage of the scheduler node by reducing the number of scheduled timers. Instead of one timer per enabled event, only a single timer for the next upcoming enabled event is started. Additionally the usage of the Node-RED event flows:started for delaying next event messages after node start until flows have been set up has been replaced by a fixed delay that is customizable and by default 0.1 seconds. Reason is that this event is an undocumented internal Node-RED event that shouldn't be used by nodes as it can be removed/changed at any time and also has some restrictions related to maximum number of allowed events. The fixed delay is optional and is used for any message being sent directly after start of the node.
This pull request optimizes the resource usage of the scheduler node by reducing the number of scheduled timers. Instead of one timer per enabled event, only a single timer for the next upcoming enabled event is started. Additionally the usage of the Node-RED event
flows:started
for delaying next event messages after node start until flows have been set up has been replaced by a fixed delay that is customizable and by default 0.1 seconds. Reason is that this event is an undocumented internal Node-RED event that shouldn't be used by nodes as it can be removed/changed at any time and also has some restrictions related to maximum number of allowed events. The fixed delay is optional and is used for any message being sent directly after start of the node.