Server-Sided Tweens VS Server-Sided Animations; Which Is More Performance Heavy?

I cannot find the answer to the question anywhere else, as all searched results are just the common “server vs client animations” or just TweenService VS Animations in general.

When BOTH are used wholly on the Server, which costs more to use: Tweens or Animations?

Apologies if this is not the correct Category, I do not use the DevForum often and no others seemed to fit.

You could probably run a few hundred tweens or animations, you shouldn’t even have tweens or animations server-side.

Of course; loading visuals on Client-Side is always the winning option. I am simply curious to know which of the two is more intensive.

Thank you for your input, it is good to know neither are too resource-heavy in moderation.

Tweens are more expensive as they have to be calculated during runtime while animations are precomputed through “baking”. However, the overhead is negligible.

Tested with a microprofiler, here’s some interesting information:

Tween updates seem to be batched every heartbeat step (.Heartbeat), after a physics step (.PostSimulation) and before render step (.PreRender or .RenderStepped). It runs serially aka on one worker thread.

Simulation → Heartbeat (tween update) → Render

On the other hand, animation updates Transform property updates run in parallel aka different worker threads at the same time, running on a physics step (I believe .PreAnimation as the animation updates before .PreSimulation or .Stepped).

Simulation (transform update → .PreSimulation) → Heartbeat → Render

If you are tweening Motor6D / animating, keep in mind that all Motor6D updates occur on simulation step (.PreSimulation or .Stepped).

All in all:
Simulation (transform update → .PreSimulation → motor6D update) → Heartbeat (tween update) → Render

This is from my understanding, correct me if I’m wrong.

The animation and tween updates I mentioned above only update the properties. It is only seperate jobs such as applyJointTransforms that actually apply the updated properties into instances. Animations support throttling (workspace.ClientAnimatorThrottling) but tweens do not. Furthermore, animation updates run on parallel which may help.

Animations may in fact be a more performant solution (assuming you’d want to tween the same amount of joints as a regular animation would), but you will have to test.

But of course, always go for clientside animations when possible.