Before this PR, whenever the frame changed during scrubbing,
the whole outliner tree would be rebuilt.
This rebuilding did not happen when playing back.
This was a major bottleneck, especially on scenes with many objects.
As far as I can tell there is no need to do that,
since there is no function that changes the
scene structure when the frame is changed.
The only way to do that is to add a python handler
for `post_frame_change`, but that also fires when playing back.
The performance gains can be quite significant.
I've made a scene with 32.000 cubes
and the `wm_draw_update` function goes from
~60ms
to
~30ms
Pull Request: https://projects.blender.org/blender/blender/pulls/114845