[Bf-blender-cvs] [386efee] asset-experiments: Minor tweak - adapt a bit number of preview workers to number of available physical threads!
Bastien Montagne
noreply at git.blender.org
Sun Aug 9 18:09:22 CEST 2015
Commit: 386efee483eefbecde39395041ea64151eb9b28d
Author: Bastien Montagne
Date: Sun Aug 9 18:08:33 2015 +0200
Branches: asset-experiments
https://developer.blender.org/rB386efee483eefbecde39395041ea64151eb9b28d
Minor tweak - adapt a bit number of preview workers to number of available physical threads!
===================================================================
M source/blender/editors/space_file/filelist.c
===================================================================
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 54e7b9f..c5145d5 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -1095,7 +1095,7 @@ static void filelist_cache_preview_ensure_running(FileListEntryCache *cache)
if (!cache->previews_pool) {
TaskScheduler *scheduler = BLI_task_scheduler_get();
TaskPool *pool;
- int num_tasks = 4;
+ int num_tasks = max_ii(2, BLI_system_thread_count() / 2);
pool = cache->previews_pool = BLI_task_pool_create(scheduler, NULL);
cache->previews_todo = BLI_thread_queue_init();
More information about the Bf-blender-cvs
mailing list