Blender Git Commit Log

Git Commits -> Revision e206a0a

Revision e206a0a by Jacques Lucke (master)
November 24, 2021, 16:26 (GMT)
Geometry Nodes: reduce thread switching in evaluator

When a node is executed, it usually schedules other nodes.
Right now, those newly scheduled nodes are added to a
task pool so that another thread can start working on them
immediatly.

However, that leads to the situation where sometimes each
node in a simple chain is executed by another thread. That
leads to additional threading overhead and reduced cache
efficiency (for caches that are not shared between cores).

Now, when a node is executed and schedules other nodes,
the first of those newly scheduled nodes will always be
executed on the same thread once the current node is done.
If it schedules more than one other node, those will be
added to the task pool as before.

The speedup achieved by this is hard to measure. I found it
to be a couple percent faster in some extreme cases, not
much to get excited about. It's nice though that the number
of tasks added to the task pool is commonly reduced by a
factor of 4 or 5.

Commit Details:

Full Hash: e206a0ae960c2c62df6ece863bf855dda581d4f1
Parent Commit: 4930cd5
Lines Changed: +102, -53

1 Modified Path:

/source/blender/modifiers/intern/MOD_nodes_evaluator.cc (+102, -53) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021