Frame rate drops over time because of Event Tick?

Hello. In my project, I have a sequencer connected to an event tick. This is causing my frame rate to drop to 10 in under a minute. In my blueprint, I need all of the things to be constantly running and checking for variables, branches, etc (that is why I hooked up the sequencer to the event tick). How would I be able to stop the lag, but not have to change everything? Thank you.

Uh oh! I don’t think it’s the event tick after all. Please tell me if this is causing the lag, because even when hooking the event tick up to a 1-second delay, it still lags.

Actually, it is confirmed. When I disabled the event tick, it didn’t lag.

When I put on a long delay (10 seconds), it takes longer for it to drop. Is it a node, or is it just too many things hooked up to the sequencer?

doing things on tick is generally a bad way to go, that is theres usually a better method that could be used. tick is an expensive operation when you have many things being run. just think if you have 20 pins off the sequence as you do, thats 20 scripts that need to be run between each frame. on a decently well optimized game thats lets say 60 times per second, so thats 1200 operations per second. and thats not even taking into account how complex the operations are. lets imagine you instead tried using a timer which loops every 0.2 seconds, in this case the sequence would only be run 5 times per second for a total of 100 operations per second. that simple solution would save you a bunch of performance with only slightly less responsiveness.

though a system where things are only run when needed would be better. maybe you could post more script and explain what your trying a bit more so we could propose alternative methods.

most of the things hooked up to the sequence are variables connected to branches. So when the variable gets turned to true or false it activates something. the event tick helped with that because it would do the action on the exact moment and every millisecond practically, it would be checking.

so little info given. such spaghetti. what are your variables actually doing? i see you are repeatedly setting a snow variable to true (whats the point if its not allowed to change why keep setting it), but you are not actually calling any events. you really should consider re-configuring your script, most things could be done with loops or direct calling of events. for example where you set enable extra functions you could immediately have a function or call an event that sets the lightning var.

the snow variable I could remove, it was just to test snow particles when the variable was true. also, a lot of the things the event tick leads off to is things such as casting to classes. I really need to organize, but for now, most of the things are either variables or casts. Also, should I make a function for every cast or just a function for all the casts? If I did a function for every cast (with a loop) that would be hard to keep track of. If I did a function for all them, would it lag still? Please let me know.

without context and knowing the end goal for each thing its hard to tell you to do A or B. we would need to go through each individual process to determine the best method to use.

optimization can be a tricky thing but basically doing less will give you better responsiveness. so doing less things or doing the same number of things simpler with less nodes, will give you better performance.

I have fixed it! I basically removed ALL event ticks in my game (including event ticks in widgets and blueprints), and just replaced them with timers firing every 0.05 to 0.1 seconds! Thank you for the suggestion. I also organized everything. Thank you so much!!