Timeline Optimization

Hello, I hope whoever reads this post is safe and well in this difficult times.

I’m fairly new to blueprints and anything related to code so I have a question that might not be that interesting, in advance I’m sorry for that.

My questions are in regards of Timelines:

  1. How much performance gets affected if I use multiple timelines in my project?
  2. Is there a way to ensure low performance impacts when using multiple timelines?

Thank you very much for you time in advance, stay safe!

Hi -

Timelines are basically a more systematic way of using tick. In other words, the Update pin runs every frame.

Using lots of timelines is not a problem, but something computationaly heavy on the update pin is.

Just like with tick.

It’d be nice to point you to some official info about best practice, but you’re highlighting a flaw in the docs. Which is why working from practical examples may help more (along with searching threads with Tick / Timeline / Timer keywords).

Timelines come with many gotchas. They’re fine for isolated things, like cockpit-lean-in-views / speed-boost-zooms etc. But have you tried cloning them between blueprints? Plus there’s temptation to intermix them with other code that runs differently. So before you commit to them everywhere, here’s a few examples to think about:…18#post1719518…eed-time-maths…79#post1588379

Also timelines are using curves. I don’t think curves are “baked”, so they get evaluated every time you get a value from it. In a curve are polynomes (I guess) like a + bt + ct² + dt³ +… So with very much timelines respectively curves there could be much to compute. Maybe it’s better to “bake” the timeline to the memory (in an own class) and store the values in an array and later make a simple interpolation. E.g. if the curve is t² then “bake” the timeline with a predefined stepsize, e.g. 0.5, to an array with the values y = 0.25, 1, 2.25, 4, 6.25, 9, … and use these values. If you want to evaluate it at t = 1.2, then use the nearest y-value, so y = 1. If t = 1.3, then use y = 2.25. Just a guess that this could be more performant. But this should only matter if using really much timelines and/or curves.