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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user