Blender Git Commit Log

Git Commits -> Revision 169a87c

Revision 169a87c by Joshua Leung (master)
July 18, 2009, 07:11 (GMT)
2.5 - Optimisations for Keyframe Drawing in DopeSheet

Keyframes are now prepared for drawing by being added to a binary-tree structure instead of using insertion-sort on a Double-Linked List. This gives rather significant improvements on a few bad cases (*).

I've implemented a basic Red-Black Tree whose nodes/data-structures can also be used as a simple Double-Linked List (ListBase) for this purpose. The implementation of this tree currently does not have support for removing individual nodes, since such capabilities aren't needed yet.

Stats (using keyframes from an imported .bvh animation file):
* When only the keyframes are drawn (i.e. long keyframes are not identified), the time needed to draw the DopeSheet region 10 times went down from 4000ms to about 300ms.
* When long keyframes are considered as well, the same test has gone from 6000ms to 3000ms. There is still a bottleneck there that I haven't been able to remove yet (an attempt at this made the runtimes go through the roof - 32000 ms for the test done here).

Assorted Notes:
* Added missing headers for some files
* Fixed profiling flags for mingw. There was an extra space which prevented the sound-code from compiling.

Commit Details:

Full Hash: 169a87cb0b51b29a01274db6b106e9a8d0cca8ac
SVN Revision: 21672
Parent Commit: 43ac3ae
Lines Changed: +898, -206

2 Added Paths:

/source/blender/blenlib/BLI_dlrbTree.h (+101, -0) (View)
/source/blender/blenlib/intern/DLRB_tree.c (+359, -0) (View)

9 Modified Paths:

/config/win32-mingw-config.py (+1, -1) (Diff)
/source/blender/blenkernel/BKE_animsys.h (+25, -2) (Diff)
/source/blender/editors/animation/keyframes_draw.c (+275, -175) (Diff)
/source/blender/editors/armature/poselib.c (+4, -1) (Diff)
/source/blender/editors/include/ED_keyframes_draw.h (+29, -11) (Diff)
/source/blender/editors/space_action/action_ops.c (+71, -0) (Diff)
/source/blender/editors/space_action/action_select.c (+15, -7) (Diff)
/source/blender/editors/space_nla/nla_draw.c (+5, -2) (Diff)
/source/blender/editors/space_view3d/drawarmature.c (+13, -7) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021