Base vs Container Performance

Assuming the content of the base/container is equivalent: Are there performance differences between the two nodes?

Huh.

I would have thought for sure that the children compute cost is the same on base, container, and widget components. I wanted to test that for sure before I said anything, and given the same contents, it does look like there is a difference in the children CPU cook time:

red - encapsulated in a base
yellow - encapsulated in a container
green - encapsulated in a widget

trail1 - separate graphs
trail2 - all on the same graph (easier to see visually their differences)
trail3 - trailed set of averages

Both trail CHOPs are 4 seconds of data.

compute-comparision.toe (4.0 KB)

It’s also very possible that there’s some unaccounted frame time here - since containers and widgets have an additional compositing step when it comes to final output.

This might be better answered by someone at Derivative home base. I’d be curious to know if there’s a performance advantage of one of these component types - since this breaks some of my initial assumptions about how components work. :grimacing:

Tagging @ben here also - since he always knows the deep secrets of TouchDesigner magic.

3 Likes

Interesting! Often wondered about this but never tried testing it. Curious to hear about the inner workings here as well.

1 Like

@raganmd My results are different, widget slowest for me on startup. However, you can change which one is the longest by toggling the component’s cook flag off/on. This 0.02~0.03 difference (on my system) seems to be order of cooking in the cook stack, which you can see change in the Performance Monitor when you toggle these cook flags.

Testing them one at a time I get the same values within 0.01 of each other, ie. deleting the other 2 and doing solo tests. This is the valid test of this imo, if you still have large differences let us know.

1 Like

Repeating the test with these conditions I see the same results. :white_check_mark:

Happy to see that this is more about cook stack than about the containing op - had a real moment :sweat_smile: earlier looking at this.

Thanks for the research! I’m fairly new to TD, but have a programing and IT background. Much of what I use TD for is rapid application development and logic. I have a ton of replicators that function like loops in traditional code and that made me wonder about the efficiency of those replicators with the types of OPs that I replicate. I run a 5950x and a RTX3090 to nearly 100% during live shows, so performance optimization is always a focus in my workflow. Even seeing how you all tested this helped me learn a little more about TD!

1 Like