Blender Git Loki

Git Commits -> Revision 60cfdf0

Revision 60cfdf0 by Jeroen Bakker (master)
September 10, 2021, 11:28 (GMT)
Anim: Keylist drawing optimization by using arrays.

Change data structure of keylists. Reducing the balancing overhead and therefore increases performance.

| **Function** | **Master** | **Patch** |
|`draw_summary_channel`| 0.202105s| 0.083874s |

When adding items to the keylist it will store it in a linked list. This linked list is
accompanied with the length (key_len) and a `last_accessed_column`. last_accessed_column is a cursor
that improve the performance when adding new items as they are mostly ordered by frame numbers.
last_accessed_column is reset when a new fcurve/mask/... is added to the keylist.

Before searching or array access. the listbase needs to be converted to an array.
`ED_keylist_prepare_for_direct_access`. After that the caller can use
`ED_keylist_find_*` or `ED_keylist_array*` functions.

The internal array can also be accessed via the `ED_keylist_listbase` function.
The items inside the array link to the previous/next item in the list.

Reviewed By: sybren

Differential Revision: https://developer.blender.org/D12052

Commit Details:

Full Hash: 60cfdf080929aca61c37439b601b1ef85d51391a
Parent Commit: a00507c
Lines Changed: +397, -135

8 Modified Paths:

/source/blender/editors/animation/anim_draw.c (+1, -0) (Diff)
/source/blender/editors/animation/anim_motion_paths.c (+2, -0) (Diff)
/source/blender/editors/animation/keyframes_draw.c (+21, -8) (Diff)
/source/blender/editors/animation/keyframes_keylist.cc (+360, -122) (Diff)
/source/blender/editors/armature/pose_slide.c (+2, -0) (Diff)
/source/blender/editors/include/ED_keyframes_keylist.h (+9, -5) (Diff)
/source/blender/editors/screen/screen_ops.c (+1, -0) (Diff)
/source/blender/editors/space_action/action_select.c (+1, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021