# "Size Boxes use multiple passes to calculate their size and render themselves." - Is this actually true?

**URL:** <https://forums.unrealengine.com/t/size-boxes-use-multiple-passes-to-calculate-their-size-and-render-themselves-is-this-actually-true/2716921>\
**Category:** UI\
**Tags:** unreal-engine, slate, UI, question, UMG\
**Created:** [April 20, 2026, 11:56pm UTC](https://forums.unrealengine.com/t/size-boxes-use-multiple-passes-to-calculate-their-size-and-render-themselves-is-this-actually-true/2716921 "2026-04-20T23:56:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Switchback\_Stu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Switchback\_Stu](https://forums.unrealengine.com/u/Switchback_Stu)\
**Post date:** [April 20, 2026, 11:56pm UTC](https://forums.unrealengine.com/t/size-boxes-use-multiple-passes-to-calculate-their-size-and-render-themselves-is-this-actually-true/2716921/1 "2026-04-20T23:56:15Z")

</div>

According to Unreal’s [documentation](https://dev.epicgames.com/documentation/unreal-engine/optimization-guidelines-for-umg-in-unreal-engine#usespacersinsteadofsizeboxeswhenpossible), size boxes are bad for performance because they require multiple passes.

However, if you actually look at the code in `SBox.cpp`, this doesn’t seem to be true at all?

Desired size is a simple comparison between desired size of the child and any overrides that might have been set.

> **From SBox::ComputeDesiredWidth()**
>
> ```cpp
> float CurrentWidth = UnmodifiedChildDesiredSize.X;
> 
> if (CurrentMinDesiredWidth.IsSet())
> {
> CurrentWidth = FMath::Max(CurrentWidth, CurrentMinDesiredWidth.Get());
> }
> 
> if (CurrentMaxDesiredWidth.IsSet())
> {
> CurrentWidth = FMath::Min(CurrentWidth, CurrentMaxDesiredWidth.Get());
> }
> 
> return CurrentWidth;
> 
> ```

Arrange children is also very straightforward. The exception, I suppose, is that if you constrain aspect ratio then the logic is more complex. However, not only is this rare in general, but I still don’t see anything that would be considered “multiple passes”.

> **From SBox::OnArrangeChildren()**
>
> ```cpp
> AlignmentArrangeResult XAlignmentResult = AlignChild<Orient_Horizontal>(AllottedGeometry.GetLocalSize().X, ChildSlot, SlotPadding);
> AlignmentArrangeResult YAlignmentResult = AlignChild<Orient_Vertical>(AllottedGeometry.GetLocalSize().Y, ChildSlot, SlotPadding);
> 
> if (CurrentMaxAspectRatio.IsSet() || CurrentMinAspectRatio.IsSet())
> {
> ...
> }
> 
> ArrangedChildren.AddWidget(AllottedGeometry.MakeChild(ChildSlot.GetWidget(), FVector2D(XAlignmentResult.Offset, YAlignmentResult.Offset), FVector2D(XAlignmentResult.Size, YAlignmentResult.Size)));
> 
> ```

So am I missing something, or is the documentation just wrong here?
