From 05d3eb5eeaca0ecd9d7ffc20ac1129016ee006a5 Mon Sep 17 00:00:00 2001 From: Iliya Katueshenock Date: Fri, 2 Jun 2023 20:27:42 +0200 Subject: [PATCH] Geometry Nodes: Parallelelize a delete geometry selection conversion Parallelize the conversion of an edge selection to a vertex selection, which makes it approximately twice as fast (0.6 ms -> 0.3 ms). In another test the whole node operation became about 17% faster, from 6.9 to 5.9ms. This only applies to the "All" mode with the edge selection domain. Similar to 3d209d161988d6000c2f99fa4051f9a117ffbfd5 Pull Request: https://projects.blender.org/blender/blender/pulls/108541 --- source/blender/geometry/intern/mesh_copy_selection.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/geometry/intern/mesh_copy_selection.cc b/source/blender/geometry/intern/mesh_copy_selection.cc index 8654e3f2089..50925b926e1 100644 --- a/source/blender/geometry/intern/mesh_copy_selection.cc +++ b/source/blender/geometry/intern/mesh_copy_selection.cc @@ -78,7 +78,7 @@ static IndexMask vert_selection_from_edge(const Span edges, IndexMaskMemory &memory) { Array array(verts_num, false); - edge_mask.foreach_index_optimized([&](const int i) { + edge_mask.foreach_index_optimized(GrainSize(4096), [&](const int i) { array[edges[i][0]] = true; array[edges[i][1]] = true; });