Moving the Sun & Using Timelines causes lag

Hi there, following this tutorial (but setting the sun’s rotation speed much slower) causes nearly no lag when used by itself.

Separately, if I have a bunch of actors following a spline using a timeline uses little enough CPU.

(Note, for repro, the timelines are 0.f-1.f along the x axis and 0.f-1.f along the y axis, y axis is percentage completion of the spline and x axis is percentage completion of the allowed time, so the timeline has .SetPlayRate((1 / BestFinishTime) * (FinishTime / BestFinishTime))

If I do one or the other of the above things, the game runs at 60FPS(+) with no issues. However, if I do both at the same time, then the game stalls the CPU with a bunch of “wait for event xx” (oh and GPU use drops dramatically too…?)

I have two stat files which I can attach but are too large… (9MB and 11MB). If it is possible for me to email somebody with the stat files please let me know.

Note: It cannot be that the actors I am adding to the scene are too complicated as they can be added and no issues exist until I start running the Timelines.

Hi vikhik,

Could you supply a small test project that showcases the issue? Please also include repro steps as well.

I’ll see what I can do tomorrow, thanks :slight_smile:

I cannot replicate the issue…

Unfortunately, even with pulling down the old version of the repo it appears that I have a “wait” every time I recapture sky on the sky light.

However, I still have the old logs where the wait only happened once my race had begun.

I’m sorry I am misunderstanding. Is the lag issue still happening?

Hi TJ, I have narrowed it down and it turns out that I was merely not moving the sun when I was not racing. (I failed to hook up a False branch exec back to the output of a function)

Moving the sun, recapturing the sky, etc., rightfully causes the correct amount of wait while everything computes.

Turns out that I was just being silly, please close this bug report!

However, if you follow the tutorial linked above and use the “stat detailed” command twice, followed by “stat FPS” you get some very weird stats.

i.e. Draw/GPU are very very lose (<2ms) and CPU is medium (<10ms) but the Frame time is very high (>20ms)