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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-09-29 02:38:44 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-09-29 16:27:37 +0300
commitc931a0057ffea26175a2dc111718e5f3590b00f8 (patch)
tree8a8f9394956d3dcda37cddd682ec01573af55b9c /source/blender/blenkernel/intern/pbvh.c
parent8b00a73620d9635e0ceab82e227dcbd540c4b45a (diff)
Sculpt: use dynamic scheduling and chunk size 1 for multithreading
This is under the assumptions that each node has enough work to avoid the threading overhead, while also having a possible variable amount of work. For example most of the vertices being masked or outside of the brush radius. Improves performance by about 10% for tools like mesh filter on an entire 3 million poly mesh, tested on a quad core. Ref T68873
Diffstat (limited to 'source/blender/blenkernel/intern/pbvh.c')
-rw-r--r--source/blender/blenkernel/intern/pbvh.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c
index 79586c71673..bfc513454b4 100644
--- a/source/blender/blenkernel/intern/pbvh.c
+++ b/source/blender/blenkernel/intern/pbvh.c
@@ -2550,7 +2550,9 @@ void BKE_pbvh_parallel_range_settings(TaskParallelSettings *settings,
bool use_threading,
int totnode)
{
- const int threaded_limit = 4;
+ const int threaded_limit = 1;
BLI_parallel_range_settings_defaults(settings);
settings->use_threading = use_threading && (totnode > threaded_limit);
+ settings->min_iter_per_thread = 1;
+ settings->scheduling_mode = TASK_SCHEDULING_DYNAMIC;
}