Blender Git Loki

Git Commits -> Revision b9c2570

Revision b9c2570 by Bastien Montagne (master)
July 30, 2019, 12:36 (GMT)
BLI_task: tweak default chunk size for `BLI_task_parallel_range()`.

Previously we were setting it to 1 (aka no 'chunking'), to follow
previous behavior. However, this is far from optimal, especially with
CPUs that can have tens of threads nowadays.

Now taking an heuristic approach (inspired from the one already existing
for `BLI_task_parallel_listbase()`, which tries to guesstimate best
chunk sizes based on several factors (amount of threads/parallel tasks,
total number of items, ...).

Think this is a reasonable base ground, more optimization here would of
course be possible.

Note that code that was already explicitely settings some value here
won't be affected at all by that change.

Commit Details:

Full Hash: b9c257019fe256af6c2978b94b4948d18a6cd4eb
Parent Commit: ae7db53
Lines Changed: +46, -14

2 Modified Paths:

/source/blender/blenlib/BLI_task.h (+2, -5) (Diff)
/source/blender/blenlib/intern/task.c (+44, -9) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021