You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've seen that if I have a node that has a large output size (e.g. a large array), when I split the output across multiple nodes there is a major performance hit, even if the other nodes aren't using the data
Expected Behavior
I expected that a simple forward of data in the flow doesn't have a so significant impact to flow execution.
Steps To Reproduce
Create a node that output a big sized data (e.g. a image), and connect it to multiple nodes
Example flow
paste your flow here
Environment
Node-RED version: 3.1.3
Node.js version: 20.9.0
npm version: 10.2.3
Platform/OS: Ubuntu
Browser: Chrome
The text was updated successfully, but these errors were encountered:
Please supply an example flow that demonstrates the problem,
But assuming you mean having 2 (or more) output wires to different nodes then the whole message needs to be cloned before being forwarded, this is to ensure that modifications made on each downstream path do not change the msg object in the other path.
If the message contains a large array then it will take time to make this clone.
This is working as intended, pull requests to increase the performance of deep object copies will always be appreciated.
Yes - as Ben says, splitting a flow involves cloning the message for each separate output wire. - So if possible don't do it if you are handling large objects. Can the operations be handled in series rather than parallel ? etc.
Current Behavior
I've seen that if I have a node that has a large output size (e.g. a large array), when I split the output across multiple nodes there is a major performance hit, even if the other nodes aren't using the data
Expected Behavior
I expected that a simple forward of data in the flow doesn't have a so significant impact to flow execution.
Steps To Reproduce
Create a node that output a big sized data (e.g. a image), and connect it to multiple nodes
Example flow
Environment
The text was updated successfully, but these errors were encountered: