# Widget Component slow performance

**URL:** <https://forums.unrealengine.com/t/widget-component-slow-performance/394179>\
**Category:** UI\
**Tags:** unreal-engine, Performance, Widget, Blueprint, question\
**Created:** [May 21, 2017, 3:47pm UTC](https://forums.unrealengine.com/t/widget-component-slow-performance/394179 "2017-05-21T15:47:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pyrofox](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pyrofox](https://forums.unrealengine.com/u/Pyrofox)\
**Post date:** [May 21, 2017, 3:47pm UTC](https://forums.unrealengine.com/t/widget-component-slow-performance/394179/1 "2017-05-21T15:47:49Z")

</div>

Hi, I’d like to display the life of a tree after I hit it.  
To do that, I created an actor blueprint composed with a simple tree shape, and a widget component hidden at start.

The problem is I have an important lag when I add my health widget.  
Ok, I have about 9 000 trees, but the widget is not visible so I don’t understand where is the calculation.

In the screen below, I tried to create a simple widget component without adding my health widget class, and I disabled all functionalities I could on the details panel.  
It doesn’t change anything, there are still two important points which are too high :

- Tick Time
- World Tick Time

What is the diference between these two values, why a simple widget component not even visible take so much time to be executed ? Thanks for your help

![138624-components.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/1/e/d1e863d2d201c5dcace7e39824e58f75121beace.png)

 ![138625-details.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/f/2/4f2cee7bbcb38c2001a9bffa8c01466016831fd0.png)

 ![138626-without+widget.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/c/0/9c06a465fcfa35c995136d38b61c033cedf67544.png)

 ![138627-with+widget.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/0/2/20288d281f266e5d84e4c47ab5a67bb05af2c867.png)

---

<div class="post-metadata">

**Author:** ![Nachtmahr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nachtmahr](https://forums.unrealengine.com/u/Nachtmahr)\
**Post date:** [May 21, 2017, 7:21pm UTC](https://forums.unrealengine.com/t/widget-component-slow-performance/394179/2 "2017-05-21T19:21:49Z")

</div>

Try this: [Screenshot - ac3b6a1d452b7949e831ca6a20c12b33 - Gyazo](https://gyazo.com/ac3b6a1d452b7949e831ca6a20c12b33)

But in general I would advise you to Add the Widget Component when you need it. There is no point on having them on over 9000 Actors by default. Something simple like that works fine you can also remove it whenever you want. (Note if you click on the Add Component Node you can Set the defaults in the Details Panel)

> **[Gyazo](https://gyazo.com/8bb901ea54752e883e8d0a2cdd7b7e9d)**
>
> Easily capture screenshots, GIFs, and replays that are ready to share. Download the free app for windows and mac.

If you only display 1 Widget at once its better to have it on your Character and move it around in Worldspace and feeding it with Tree Data instead. So you will only have 1 Widget at most in your World (saves Performance ;P)

---

<div class="post-metadata">

**Author:** ![Pyrofox](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pyrofox](https://forums.unrealengine.com/u/Pyrofox)\
**Post date:** [May 21, 2017, 8:03pm UTC](https://forums.unrealengine.com/t/widget-component-slow-performance/394179/3 "2017-05-21T20:03:47Z")

</div>

Nice tried, but your first idea doesn’t changed anything ^^

But the two others seams very good :o  
I can’t test right now because I need about 2 hours to compile when I add or remove a widget component ^^’ (and I have a good computer x)  
I’ll test tomorrow and will give you a feed back,  
Thanks for your idea !

---

<div class="post-metadata">

**Author:** ![Nachtmahr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nachtmahr](https://forums.unrealengine.com/u/Nachtmahr)\
**Post date:** [May 21, 2017, 8:11pm UTC](https://forums.unrealengine.com/t/widget-component-slow-performance/394179/4 "2017-05-21T20:11:57Z")

</div>

cO you need 2 hours to Compile? Are you rebuilding the Engine Source every time xD? Takes ~1min usually for a small change like that.

Unless you mean Packaging 😜

---

<div class="post-metadata">

**Author:** ![Pyrofox](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pyrofox](https://forums.unrealengine.com/u/Pyrofox)\
**Post date:** [May 21, 2017, 10:03pm UTC](https://forums.unrealengine.com/t/widget-component-slow-performance/394179/5 "2017-05-21T22:03:44Z")

</div>

xD Usually the time is very short, but not since I add all these trees  
I just click on the Compile button in the Blueprint class and everything freeze, I can’t even back to my desktop during 2 hours x) I still can use my computer but not changing anything on Unreal. Yeah it took me a while to understand that the problem came from my Widget Component ^^

---

<div class="post-metadata">

**Author:** ![Pyrofox](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pyrofox](https://forums.unrealengine.com/u/Pyrofox)\
**Post date:** [May 22, 2017, 11:55am UTC](https://forums.unrealengine.com/t/widget-component-slow-performance/394179/6 "2017-05-22T11:55:19Z")

</div>

Thank you very much, everything is working fine 😃
