diff options
author | Jacques Lucke <jacques@blender.org> | 2021-11-24 19:22:02 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-11-24 19:26:41 +0300 |
commit | e206a0ae960c2c62df6ece863bf855dda581d4f1 (patch) | |
tree | e037f1d3c6d21c83b0cbc5623c72da982c196365 /source/blender/blenlib | |
parent | 4930cd5db6153d6fd40481ea1be0f5cb33d46466 (diff) |
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.
Diffstat (limited to 'source/blender/blenlib')
0 files changed, 0 insertions, 0 deletions