diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-11-19 18:47:41 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-11-19 18:58:58 +0300 |
commit | 83e87655627fc2156a87dbfe2f676869b97fa8d2 (patch) | |
tree | 667b73ce8b63b72f1de0b7d77796fe6dd97b7a1a /source/blender/blenkernel/intern/subdiv_foreach.c | |
parent | 6fea251e01797f6b71873e18b1f491273a26fed0 (diff) |
Subdiv: Tweak threading settings
Ensure that all threads on a multi-core system are used.
The issue was that BLI_task module was trying to be smart and
used heuristic to find optimal number of iterations per thread.
This heuristic assumes that tasks are light-weight, which is
not a case for subdivision surface.
On a higher subdivision level with a file from T70826 the
evaluation time goes down from 0.25 to 0.17 seconds per modifier
evaluation.
When D6189 is finalized we can being some extra performance
improvement.
Diffstat (limited to 'source/blender/blenkernel/intern/subdiv_foreach.c')
-rw-r--r-- | source/blender/blenkernel/intern/subdiv_foreach.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/subdiv_foreach.c b/source/blender/blenkernel/intern/subdiv_foreach.c index f9039767f53..37e47cc5b10 100644 --- a/source/blender/blenkernel/intern/subdiv_foreach.c +++ b/source/blender/blenkernel/intern/subdiv_foreach.c @@ -1825,6 +1825,7 @@ bool BKE_subdiv_foreach_subdiv_geometry(Subdiv *subdiv, BLI_parallel_range_settings_defaults(¶llel_range_settings); parallel_range_settings.userdata_chunk = context->user_data_tls; parallel_range_settings.userdata_chunk_size = context->user_data_tls_size; + parallel_range_settings.min_iter_per_thread = 1; if (context->user_data_tls_free != NULL) { parallel_range_settings.func_finalize = subdiv_foreach_finalize; } |