Page MenuHome

Depsgraph: isolate node evaluation tasks
Needs ReviewPublic

Authored by Brecht Van Lommel (brecht) on Jun 22 2021, 8:07 PM.

Details

Summary

Follow up to D11603. This changes causes threads to potentially evaluate
multiple objects recursively, which could be bad for performance and memory usage.

For example I encountered a case where the the stack trace was, which seems
pretty bad:

  • hair distribute
  • eval object
  • TBB wait
  • subdiv
  • eval object
  • TBB wait
  • subdiv
  • eval object

This potentially explains some uneven performance I was seeing, where loading
barbershop_interior.blend sometimes took 5x longer than usual. However more
performance and correctness testing is needed, since this re-introduces nested
isolation regions which may be problematic.

Diff Detail

Repository
rB Blender
Branch
isolate-depsgraph (branched from master)
Build Status
Buildable 15365
Build 15365: arc lint + arc unit

Event Timeline

Brecht Van Lommel (brecht) requested review of this revision.Jun 22 2021, 8:07 PM
Brecht Van Lommel (brecht) created this revision.

I don't really have a better idea on how to solve this, so LGTM.
If I'm not mistaken, this shouldn't introduce new deadlocks (unless there is a bug in another place), because afaik evaluate_node(...) will not schedule any tasks that need to be executed by the task pool. The important thing here is that schedule_children(...)is not in the isolated region. Nested isolated regions themselves shouldn't be a cause for concern afaik.

This revision is now accepted and ready to land.Jun 23 2021, 9:38 AM

Unfortunately, this patch re-introduces the original issue with the 060_0010_A.lighting.blend from the production: P2203

This revision now requires review to proceed.Jun 23 2021, 1:51 PM