# Performance Insights on UStruct vs UClass / Class

**URL:** <https://forums.unrealengine.com/t/performance-insights-on-ustruct-vs-uclass-class/464290>\
**Category:** Editor Scripting\
**Tags:** ustruct, Class, UClass, unreal-engine, Performance, UE4, question\
**Created:** [April 26, 2020, 7:33pm UTC](https://forums.unrealengine.com/t/performance-insights-on-ustruct-vs-uclass-class/464290 "2020-04-26T19:33:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![atanknomore](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@atanknomore](https://forums.unrealengine.com/u/atanknomore)\
**Post date:** [April 26, 2020, 7:33pm UTC](https://forums.unrealengine.com/t/performance-insights-on-ustruct-vs-uclass-class/464290/1 "2020-04-26T19:33:19Z")

</div>

Hello,

I’d like some further information on how different Class types utilize information. First, I will state that I holster most of my information and logic handling inside UStructs at the moment, and implement them inside UObjects, so far staying within AActors and/or UActorcomponents.

I understand that FStructs’ instantiation takes fewer resources and allows for more flexible workflows (where data can be copied over and passed over the network). However, now looking into it, I find myself having over 250 UStruct Classes in my entire project (functionality covers an entire mid-large scale project). The reason for this is that I’ve stuck to a highly modular approach, where systems are approached from an open-PoV and are not environment conscripted (for example let’s say an Ability’s functionality only existing inside a specific actor/component. A lot of these classes are just Wrappers (handling Arrays of a given declared class) for more complex usages.

Having some context established, I now proceed to the point of the question: How is performance affected going from Class/UClass to UStruct? Is there much overhead given that the majority of the logic questions/ handling functions are declared inside said Structures? I do have to say that it does make working with them a breeze though.

While I have done network optimization on them, I’m now curious about whether I should put some (or most)? inside Classes (if not UClasses). Besides concept-knowledge (such as they’re not garbage collected), is there a significant tradeoff (CPU and ram wise) between them in real-time (other than class instantiation)?
