Blender Git Loki

Git Commits -> Revision ee98dc8

Revision ee98dc8 by Sybren A. Stüvel (master)
July 23, 2020, 12:52 (GMT)
Fix T77277: building depsgraph inter-driver relations is slow

The extra depsgraph relations that were added to prevent threading
issues during evaluation (rB4c30dc343165) caused a considerable slowdown
on complex scenes with many drivers (T77277, T78615). This commit
improves this as follows.

Only the following drivers are considered for execution serialisation:
- Drivers on Array elements, and
- Drivers on Boolean or Enum properties.

Relations between drivers of the same arrays are added blindly, i.e.
without checking for transitive or cyclic relations. This is possible as
other relations will just target the `PROPERTIES_ENTRY` or
`PROPERTIES_EXIT` nodes.

Checking whether a driver is on an array is first done by checking
`array_index > 0`, and then falling back to resolving the RNA path to an
RNA property and inspecting that.

The code also avoids circular dependencies when there are multiple
drivers on the same property. This not something that is expected to
happen (both the UI and the Python API prevent duplicate drivers), it
did happen in a file (F8669945, example file of T78615) and it is easy
to deal with here.

Reviewers: sergey

Subscribers: mont29

Comment update

Commit Details:

Full Hash: ee98dc8d0fc8d25a2369e6da58d76652f324c8ea
Parent Commit: 37ad90c
Lines Changed: +337, -115

2 Added Paths:

/source/blender/depsgraph/intern/builder/deg_builder_relations_drivers.cc (+258, -0) (View)
/source/blender/depsgraph/intern/builder/deg_builder_relations_drivers.h (+76, -0) (View)

2 Modified Paths:

/source/blender/depsgraph/CMakeLists.txt (+2, -0) (Diff)
/source/blender/depsgraph/intern/builder/deg_builder_relations.cc (+1, -115) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021