Blender Git Commit Log

Git Commits -> Revision a481908

Revision a481908 by Sergey Sharybin (master)
May 31, 2017, 13:44 (GMT)
Task scheduler: Optimize subsequent pushing bunch of tasks

The idea is to accumulate all new tasks in a thread local queue
first without doing any thread synchronization (aka, locks and
conditional variables) and move those tasks to a scheduler queue
once they are all ready. This way we avoid per-task-pool lock
and only have one lock per bunch of tasks.

This is particularly handy when scheduling new dependency graph
node children. Brings FPS of cached simulation from the linked
below file from ~30 to ~50.

See documentation for BLI_task_pool_delayed_push_{begin, end}
and for TaskThreadLocalStorage::do_delayed_push.

Fixes T50027: Rigidbody playback and simulation performance regression with new depsgraph

Thanks Bastien for the review!

Commit Details:

Full Hash: a481908232ef20449e6ad6951769677e0b108ca8
Parent Commit: 2ae6973
Lines Changed: +115, -8

3 Modified Paths:

/source/blender/blenlib/BLI_task.h (+7, -0) (Diff)
/source/blender/blenlib/intern/task.c (+106, -8) (Diff)
/source/blender/depsgraph/intern/eval/deg_eval.cc (+2, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021