# Performance issues with large project – need optimization advice

**URL:** <https://discourse.nodered.org/t/performance-issues-with-large-project-need-optimization-advice/96726>\
**Category:** General\
**Created:** [23 April 2025 18:41 UTC](https://discourse.nodered.org/t/performance-issues-with-large-project-need-optimization-advice/96726 "2025-04-23T18:41:24Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [23 April 2025 19:39 UTC](https://discourse.nodered.org/t/performance-issues-with-large-project-need-optimization-advice/96726/3 "2025-04-23T19:39:58Z")

</div>

If you count all the nodes in each subflow and multiply that by how many instances you have in your project, what number do you get?

E.g. subflow 1 has 20 nodes and the project has 5 of these === 100

Subflow 2 has 10 nodes and the project has 10 instances=== 100

Subflow 3 has 25 nodes and there is only 1 instance inside subflow 2 === (10 x 25) === 250

Here is another thread...

> [@Size of flows.json and performance](https://discourse.nodered.org/t/size-of-flows-json-and-performance/63799/3):
>
> - Main flow has 20 `inject` nodes and 20 `subnode:my_big_subflow` instances
> - `subnode:my_big_subflow`contains 100 nodes  
> Total nodes = 20 injects 20 subflow instances + (20 \* 100) = 2040 nodes to instanciate

* * *

If your subflows are not storing state (like context) you could likely replace them with link-call subroutines. They only consume the number of nodes that are written.

---

_[View the full topic](https://discourse.nodered.org/t/performance-issues-with-large-project-need-optimization-advice/96726)._
