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/editors/gpencil
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/editors/gpencil')
-rw-r--r--source/blender/editors/gpencil/gpencil_data.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c
index 96b0296a7de..9fd74ef2c46 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -2642,6 +2642,7 @@ int ED_gpencil_join_objects_exec(bContext *C, wmOperator *op)
dvert->dw->def_nr = idx;
}
}
+ BKE_defvert_array_sort_weights(gps->dvert, gps->totpoints);
}
}
}