Event tick Optimization (Branch needed?)

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 :thinking:
image

Thanks!

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…

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 :slight_smile:

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

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.

1 Like

Thanks for the advice, will do!

1 Like