# Event tick Optimization (Branch needed?)

**URL:** <https://forums.unrealengine.com/t/event-tick-optimization-branch-needed/494659>\
**Category:** Debugging, Optimization, & Profiling\
**Tags:** Optimization, branch, event-tick, unreal-engine, question, UE4-27\
**Created:** [February 5, 2022, 5:17pm UTC](https://forums.unrealengine.com/t/event-tick-optimization-branch-needed/494659 "2022-02-05T17:17:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![eromanga](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@eromanga](https://forums.unrealengine.com/u/eromanga)\
**Post date:** [February 5, 2022, 5:17pm UTC](https://forums.unrealengine.com/t/event-tick-optimization-branch-needed/494659/1 "2022-02-05T17:17:19Z")

</div>

Hi! I want to get into optimization and have a question regarding event tick. From an optimization perspective what is going to be more optimized: setting certain value to variable (widget text) every tick or checking beforehand if It’s already set to value and only if not set it to value I need? I don’t know if maybe it doesn’t affect performance at all 🤔  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/1/0/5103c0134f6919d5008d61ab75f98b2cc2341932.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/c/f/bcfe95dbc8f68de958cd1057227216a4dde4698e.png)

Thanks!

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [February 5, 2022, 7:55pm UTC](https://forums.unrealengine.com/t/event-tick-optimization-branch-needed/494659/2 "2022-02-05T19:55:11Z")

</div>

Both of these are pretty much the same, because you’re doing it on tick.

I would only bother optimizing if you’re having problems.

I believe it’s possible to trigger updates in a widget using event dispatchers, so you only update when something has actually changed. But like I say, a lot of hassle if you’re not noticing any problems…

---

<div class="post-metadata">

**Author:** ![eromanga](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@eromanga](https://forums.unrealengine.com/u/eromanga)\
**Post date:** [February 6, 2022, 5:22am UTC](https://forums.unrealengine.com/t/event-tick-optimization-branch-needed/494659/3 "2022-02-06T05:22:16Z")

</div>

Thanks for the reply!!

I don’t know if I should bother, but when I open up my level and see that FPS is not 120 but 80, I want to do everything I can to bring it up, because in the end I have to it anyways, better to do it as soon as I see it. Actually I haven’t done any research on this and not sure if it’s a reachable and reasonable thing to do 🙂

---

<div class="post-metadata">

**Author:** ![eromanga](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@eromanga](https://forums.unrealengine.com/u/eromanga)\
**Post date:** [February 6, 2022, 5:23am UTC](https://forums.unrealengine.com/t/event-tick-optimization-branch-needed/494659/4 "2022-02-06T05:23:46Z")

</div>

I understand that it’s not a big deal but I don’t want to stack those if it could make a difference one day

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [February 6, 2022, 9:23am UTC](https://forums.unrealengine.com/t/event-tick-optimization-branch-needed/494659/5 "2022-02-06T09:23:09Z")

</div>

You’re right here, well spotted.

The easiest way to optimize, it to remove stuff and see what difference it makes.

I’ll lay money, it’s not you setting that variable on tick.

Just make sure you have auto-save switched off, and start deleting things. That’s the quickest way to find the culprit.

---

<div class="post-metadata">

**Author:** ![eromanga](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@eromanga](https://forums.unrealengine.com/u/eromanga)\
**Post date:** [February 6, 2022, 9:39am UTC](https://forums.unrealengine.com/t/event-tick-optimization-branch-needed/494659/6 "2022-02-06T09:39:56Z")

</div>

Thanks for the advice, will do!
