Bake Action performance is still very, very poor

A while back, I commented on the poor performance of Bake Action, and was encouraged by someone (I think it was @Sybren ?) to check out recent alpha improvements to its speed. I’m afraid I can’t find the thread where it was discussed.

I’m not in the habit of downloading alphas, and I wasn’t messing around with bake action very much since then, but I’ve recently been doing a lot of action bakes in 3.0, and boy, that performance is bad.

Let’s do this. Make an empty, keyframe a few frames, linear extrapolate. New empty with copy transforms. Bake 10k keyframes with visual, clear constraints.

I didn’t time it. It felt like about 10 seconds. Is there some other operation we could compare this to? Yes, it should be about as fast as armature deforming 30k verts, with a single bone, once-- figuring out the transform of an origin, a +X ,and a +Z, 10k times. How fast should that happen? Less than a sixtieth of a second. So our bake action operation is operating at less than 1/600th of what it should be.

What does the bake action have to do in this case? Both empties are unparented, so their world space is their local space. We have to build and decompose a transformation matrix 10000 times and read the components. We have to create a linear extrapolation function, y=mx+b, and evaluate it almost 10k times. That’s all.

Now let’s undo that bake and copy/paste our pair of empties into a production file. Physics, armatures, constraints, drivers, plenty of that in our file. Shrinkwraps to subdivided meshes and such, a real mess of dependencies. But none of that should matter, because our bake isn’t dependent on any of that. We should expect our bake to take the same amount of time. How long does it take? I just let it chug for a minute-- I’ll let you know if it finishes before I’m done typing this comment.

I don’t really consider performance issues to be bugs, or else I’d be posting on the bug tracker. And I don’t want to whine: having any bake action is pretty damned cool, and I really appreciate all the work that developers have put into Blender! But I was directly asked by a developer, some time back, about whether I thought that the new bake action was performant. It is not.

That bake’s still chugging. Might have to ctrl-alt-del it.


This forum is for discussion between/with Blender developers. If you’re interested in actually contributing, please look at the relevant tasks:

If you just want to explain that things could be better, that’s something that’s already known and acknowledged, and this is not the place to repeat such things. What is needed is not more fingers that point at the sore spot, but someone to actually invest the time and effort to develop new action baking code.


Okay, sorry for bothering you.