Page MenuHome

Timeline Performance Patch
Closed, ArchivedPublic

Description

This patch addresses poor performance when dealing with a large number of keyframes (e.g. a typical mocap clip). It does this in one of two ways.

First, it makes the creation of the timeline keyframe drawlist O(n) instead of O(n^2) as before. In the existing code there was a linear duplicate keyframe check each time a keyframe was added resulting in O(n^2) time complexity to fill the draw list. A new function was added to remove this duplicity check creating a substantial speedup.

Secondly, instead of calling a glBegin/glEnd pair for each keyframe drawn, only one pair is used to draw all keyframes in the list. This should also result in a drawing speedup.

You can see the changes by importing the largest BVH file in the set and playing around with the timeline. It should move prohibitively slow in the unpatched version.

http://truebones.com/freedemo/FreeBones.zip

Details

Type
Patch

Event Timeline

Joshua Leung (aligorith) closed this task as Archived.Feb 1 2008, 11:31 AM

Hi I wanted to doublecheck if this patch made it to master, as i am encountering bad Timeline performance for the second time now.

I am using blender 2.79b on windows and imported a .bvh file with more than 10000 keyframes. When closing the timeline or deselecting all bones, so keyframes aren't displayed, it plays back in realtime. Even with 60 fps.
But when having the timeline open and all bones selected i am always below 10-20 fps depending on the length of the animation.

I checked the exact same thing in blender 2.49.2 and even with all keyframes visible in the timeline it plays back fluently with 60fps.

Also checked the same file in blender 2.80 Alpha 2 where the performance with timeline open is even worse, with under 15fps.