and this gets worse if your subflows nest subflows.
each instance creates all its internal nodes and if any of those are subflow instances, they are created too. It really doesnt take much to get to huge numbers
Example:
-
Subflow1
: 10 regular nodes, 5Subflow2
nodes -
Subflow2
: 20 regular nodes - Main flows: use 100
Subflow1s
and 100 regular nodes
this means 100 + (100 * (10 + (5 * 20)))
== 11100 nodes to be created, setup, initialised etc etc.
Contrast that with link-calls (aka pure functions):
-
Subroutine1
: 1link-in
, 10 regular nodes, 5link calls to Subroutine2
, 1link-return
-
Subroutine2
: 1link-in
, 20 regular nodes, 1link-return
- Main flows: use 100
link calls to Subroutine1
and 100 regular nodes
this means 100 + 100 + 2 + 20 + 2 + 10 + 5 == 239 nodes