Let me check this and come back. Will take some time to connect to that piece since its at work.
Agree. Did not think of that. So in actual the number of nodes (in memory / wher ever its stored) are much much more.
This is what i want to do eventually - esp since Dynamic Call is available with v3. I have significant dynamic calls. (i have raised a note regards this on Beta 3.2 topic).
I change nodes in both subflows and main flows. But let me do this - when i connect to work - let me run a test - and see if in both scenarios - the runtime takes same time to be available. I will come back.
I would certainly check the usual suspects such as exceeding your actual memory and therefore getting lots of paging - that will kill any performance. Also check whether it is Node-RED causing that or something else such as MongoDB.
Personally, I would also look to collapse some of the multiple-node flows into single function nodes.
If you enable trace level logging in the runtime you will get much more detailed information about starting/stopping individual nodes. With so many nodes that will be a lot of information, but it's also the best way to try to see where time is being spent.
I assume "2. Clicked Deploy Nodes" means you were in "Modified Nodes" deploy mode?
Since it deployed immediately but clicking inject took 8 minutes - there may be something else going on. Was the debug set to log to console? If so, do you see the new debug message in console immediately or after 8 minutes?
13 Jun 21:08:32 - [info] Node-RED version: v2.1.4
13 Jun 21:08:32 - [info] Node.js version: v16.13.2
...
...
13 Jun 21:08:57 - [trace] [flow:22d00a62550cbf2c] ------------------|--------------|-----------------
13 Jun 21:08:57 - [trace] [flow:5f762746ada88902] start flow [5f762746ada88902]
<run time was available at 21:14>
13 Jun 21:14:55 - [trace] runtime event: {"id":"runtime-state","retain":true}
13 Jun 21:14:55 - [info] Started flows
13 Jun 21:14:59 - [trace] comms.open /cfMhkppko/GRP7IpuafhhecY0N9f2+CxOK88rrju0s=
< I changed the position of a node and deployed.. following appears then>
13 Jun 21:20:08 - [trace] utils.writeFile - copied C:\ProgramData\node-red\flows.json TO C:\ProgramData\node-red.flows.json.backup
.....
.....
.....
13 Jun 21:20:08 - [trace] [flow:5f762746ada88902] start flow [5f762746ada88902]
13 Jun 21:26:05 - [trace] runtime event: {"id":"runtime-state","retain":true}
13 Jun 21:26:05 - [info] Started modified nodes
13 Jun 21:26:05 - [trace] runtime event: {"id":"runtime-deploy","payload":{"revision":"7d5d7c28857d69806fe298dd7d8f9e38"},"retain":true}
Runtime became available at 21:26.
My observations :
My inject + debug doesnt seem to reflect here. I ran it much after 21:26. And i don't see anything here. Do i need to do something special to log it. (Btw this instance is on 2.1.4).
5f762746ada88902 is an empty Flow 1. Probably the last flow in flows.json to be loaded by system.