Particle: optimize threading for many particles and many cores
authorJuan Gea <juang3d>
Tue, 21 May 2019 14:30:03 +0000 (16:30 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Tue, 21 May 2019 14:56:34 +0000 (16:56 +0200)
commitfbae1c9ed5d3473dda6a8783c4c29be15fcaf24a
tree8e4f96ae136519fc1519f3c64f46bbd1e52199a8
parent9e82e48937cc1620d79fb7b75f0bd826b7f7d84f
Particle: optimize threading for many particles and many cores

The maximum particles per task of 256 was outdated and lead to too much thread
contention. Instead define a low fixed number of tasks per thread.

On a i7-7700HQ, creating 4 million particles went down from 31s to 4s.

Thanks to Oscar Abad, Sav Martin, Zebus3d, Sebasti├ín Barschkis and Martin Felke
for testing and advice.

Differential Revision: https://developer.blender.org/D4910
source/blender/blenkernel/intern/particle_system.c