Excessive use of node.status() increase memory on open Editor

Hi, I have a pair of flows. Each flow has ca. 16 function nodes witch set always a status if a message when a message comes through.

I used NodeRED Version 3.0.2 and switched to 4.0.9. The behavior is the same in both versions as far as I know.

As far as I understand it correctly, every status change is sent to the editor. A maximum of 50 changes are sent to the editor via the websocket every 50ms. The changes are collected per connection in a stack.

This means that if there are more than 50 status changes within the 50ms, the stack grows steadily.
The debug node also seems to use the WebSocket and increase the growth of the memory.

Furthermore, if the editor is closed, the stack is probably not emptied cleanly.

Suggestion:
If a status changes several times within the 50ms, only the last change should be noted and sent.

All the comms to the editor share the same websocket. So to filter each would require it to maintain state of each “topic” being sent. For debug you may want all the messages for example. Normally it is down to the node calling status to understand what typical usage may be and if rate limiting should be applied ( eg the delay node already does this). As the function node is generic it is the author of the code that has that power so you can implement that within the function code.