DEG::is_reachable is taking 50% of DEG relation rebuild in coffee run file #77277

Closed
opened 2020-06-02 17:59:03 +02:00 by Dalai Felinto · 6 comments

File: //coffeerun/scenes/light/coffee_run.A.light.06-church.blend
Add a cube, move it around, ctrl+z.

image.png

File: //coffeerun/scenes/light/coffee_run.A.light.06-church.blend Add a cube, move it around, ctrl+z. ![image.png](https://archive.blender.org/developer/F8572436/image.png)
Author
Owner

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Author
Owner

Added subscriber: @dfelinto

Added subscriber: @dfelinto
Author
Owner

Added subscribers: @Sergey, @dr.sybren
Removed subscriber: @dfelinto

Added subscribers: @Sergey, @dr.sybren Removed subscriber: @dfelinto

After diving into this with @Sergey, we concluded the following:

  • Positive is_reachable() checks are fairly cheap, taking typically < 10 iterations.
  • Negative checks are more expensive (in that particular file), typically taking > 400 iterations.

Because of this, we want to do more early output checks, to see whether the relation is needed at all (before we check connectivity). These added relations are necessary to prevent threading issues when there are different RNA properties that map to the same memory address, i.e. bitflags and arrays (see studio/blender-studio#73593 and D6905).

We want to investigate how efficient it is to:

  • Resolve the RNA path to find the property type.
  • Skip adding the relations when the property type is anything except boolean/enum/array. This assumes that an int, float, etc. will be written to their own memory location.
  • When the property is an array, relations between the individual elements can be added without checks, as other relations will just target the PROPERTIES_ENTRY or PROPERTIES_EXIT nodes.

If the above significantly improves performance (which we expect, given the amount of computation that'll be skipped), we will look into caching the RNA path resolving to speed things up even more.

After diving into this with @Sergey, we concluded the following: - Positive is_reachable() checks are fairly cheap, taking typically < 10 iterations. - Negative checks are more expensive (in that particular file), typically taking > 400 iterations. Because of this, we want to do more early output checks, to see whether the relation is needed at all (before we check connectivity). These added relations are necessary to prevent threading issues when there are different RNA properties that map to the same memory address, i.e. bitflags and arrays (see studio/blender-studio#73593 and [D6905](https://archive.blender.org/developer/D6905)). We want to investigate how efficient it is to: - Resolve the RNA path to find the property type. - Skip adding the relations when the property type is anything except boolean/enum/array. This assumes that an int, float, etc. will be written to their own memory location. - When the property is an array, relations between the individual elements can be added without checks, as other relations will just target the `PROPERTIES_ENTRY` or `PROPERTIES_EXIT` nodes. If the above significantly improves performance (which we expect, given the amount of computation that'll be skipped), we will look into caching the RNA path resolving to speed things up even more.
Sybren A. Stüvel self-assigned this 2020-06-04 12:07:08 +02:00

This issue was referenced by ee98dc8d0f

This issue was referenced by ee98dc8d0fc8d25a2369e6da58d76652f324c8ea

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Thomas Dinges added this to the 2.90 milestone 2023-02-08 16:27:16 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#77277
No description provided.