Is the timer node efficient?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Star Frog

Timers can be created with the Timer-Node or with the command “yield (get_tree (). Create_timer (1)," timeout ")”.

The question now is whether the timer node and the command consume the same amount of memory.

:bust_in_silhouette: Reply From: kidscancode

Are you running out of memory? If so, compared to all the other things going on in your game, have you profiled and found that timers are taking up most of it?

This is a non-issue that you should not even be thinking about. Use the tools provided and make your game. Worry about performance if/when you actually have a performance problem. If you do, measure what is actually causing it.

Thanks for the summary answer! :smiley:

I think I was bored at the time XD.

Star Frog | 2020-05-18 09:41

I changed all my Yield timers to Timer nodes and now when i debug on my Android the game crashes after half a second of showing the splash screen. In the computer it works fine.
In some scenes there are 5 Timer nodes.
What’s the fix?

Maz90 | 2023-02-14 12:26