Of-course this will work with assumption that your logic don’t have to tick every frame and it can wait for certain amount of frames.
If this is not the case → you will have to find another way…
Usually I follow the following rules:
#1 Rule Find the performance boilerplate and try to optimize the algorithm.
#2 If you fail to optimize the alg → reduce the calls if possible (my example goes to one of those)
#3 If you fail try to offload certain heavy calculation to a worker thread (sometimes I prefer this over #2 when possible).
- Cheers