[WIP] Cache RNA_path_resolve
in dependency graph #77124
Labels
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
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#77124
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
State: Study to come to a proposal
Based on the information from #75208 (Dependency Graph Evaluation Optimizations)
During build time not all RNA_path_resolves can be determined.
Investigation
Current Code
depsgraph_query.c
RNA_path_resolve
is used inDEG_get_evaluated_rna_pointer
what isn't being used. Should we remove this function?depsgraph_builder_cache
Introduced by
c8f3377d03
which is already adding a cache aroundRNA_path_resolve_property
deg_builder_relations.c
build_driver_data
;property_entry_key
is the same asproperty_exit_key
, but uses a differentsource parameter. [D7872: Depsgraph: Remove unneeded
RNA_path_resolve`](https://archive.blender.org/developer/D7872)Cache hits
A cache only works if we can get a mechanism working with has cache hits. If a cache items is only used once (when created) it will add overhead. If a cache item can be shared across frames and or objects it is potentially better to cache. There is a potential that some rna_paths can be cached in the IDType. They could even by const evaluators as they can be determined at compile time and don't need to be cached at all. examples are 'Object.location/rotation/scale`.
The core of the dependency graph does all RNA_path_resolves during loading. When playing back the animation it doesn't call any RNA_path_resolve* (P1434: Research: DEG RNA path resolve
does not output anything when playing back animation). This proofs that adding a dependency specific rna resolve cache wouldn't be a solution we would be needed.
deg_* seems to be evaluated once when loading so caching this won't improve playback performance. A reason why we would want to cache this might be that the cache will be populated at this time so it reduces synchronization overhead during dependency graph evaluation.
This points us more in the direction to look into other areas where RNA_path_resolve is used inside a Node.
TODO
Research
Proposal
This proposal is still heavily influenced by any progress in this ticket.
DEG_get_evaluated_rna_pointer
as it isn't used anymore?Added subscriber: @Jeroen-Bakker
Changed status from 'Needs Triage' to: 'Confirmed'
Cache `RNA_path_resolve` in dependency graphto [WIP] Cache `RNA_path_resolve` in dependency graphChanged status from 'Confirmed' to: 'Archived'