# Just checking what happens when you export flows

**URL:** <https://discourse.nodered.org/t/just-checking-what-happens-when-you-export-flows/28676>\
**Category:** General\
**Created:** [21 June 2020 08:48 UTC](https://discourse.nodered.org/t/just-checking-what-happens-when-you-export-flows/28676 "2020-06-21T08:48:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [21 June 2020 08:48 UTC](https://discourse.nodered.org/t/just-checking-what-happens-when-you-export-flows/28676/1 "2020-06-21T08:48:30Z")

</div>

I want to check I am not wrong about a theory of what happens when you export a flow.

Exporting a flow is easy enough. But what happens if there is a `sub-flow` in the equation?

My take of a `sub-flow` is that it optimises code so where some code is used repeatedly, rather than doing that, you use a `sub-flow` and then you just use a single node.

So when you export a flow with a `sub-flow` that is used 10 times: what happens?

To simplify the question let's say:

The rest of the flow is 3k in size.  
The `sub-flow` is 3k in size too.  
But it is used 10 times.

When you export is the exported code:  
a: just over 6k  
b: just over 33k

The _just over_ is allowing for bits of code to include the connection/s to the `sub-flow`.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [21 June 2020 08:54 UTC](https://discourse.nodered.org/t/just-checking-what-happens-when-you-export-flows/28676/2 "2020-06-21T08:54:37Z")

</div>

> [@Trying\_to\_learn](#):
>
> a: just over 6k

It contains one full copy of the subflow.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [21 June 2020 08:55 UTC](https://discourse.nodered.org/t/just-checking-what-happens-when-you-export-flows/28676/3 "2020-06-21T08:55:20Z")

</div>

Thanks.

I just wanted to check.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [5 July 2020 08:55 UTC](https://discourse.nodered.org/t/just-checking-what-happens-when-you-export-flows/28676/4 "2020-07-05T08:55:25Z")

</div>

Closed on 5 July 2020 08:55 UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
