Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <jeroen@blender.org>2020-07-10 13:05:31 +0300
committerJeroen Bakker <jeroen@blender.org>2020-07-10 13:09:40 +0300
commit39b525e0f07fa25dcda54226ade789959b642dec (patch)
tree0edf4a741773bd5be3eddf4ae7b50ff61227a3b9 /source/blender/makesdna/DNA_meshdata_types.h
parent77a646279db72b52dd77e7c4160c3dff4e30c99e (diff)
Fix T78296: Performance - Use Binary Search for MDeformWeight
Use binary search for querying deform weights. Spring 02_020_A.anim.blend on Ryzen 1700X goes from 12.4 to 12.7fps. During profiling it was detected that adding new items to the head was faster than adding to the tail. Reviewed By: Campbell Barton Differential Revision: https://developer.blender.org/D8127
Diffstat (limited to 'source/blender/makesdna/DNA_meshdata_types.h')
-rw-r--r--source/blender/makesdna/DNA_meshdata_types.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h
index cc2ba3fb999..a4299d3c6a2 100644
--- a/source/blender/makesdna/DNA_meshdata_types.h
+++ b/source/blender/makesdna/DNA_meshdata_types.h
@@ -286,6 +286,7 @@ typedef struct MDeformWeight {
} MDeformWeight;
typedef struct MDeformVert {
+ /* Mut be sorted by def_nr due to binary search. */
struct MDeformWeight *dw;
int totweight;
/** Flag is only in use as a run-time tag at the moment. */