WIP: Refactor: Remove extra node mark calls #123760

Closed
Sean Kim wants to merge 1 commits from Sean-Kim:refactor-remove-positions-update into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Member

These calls should be redundant based on the overall handling in
push_undo_nodes.


Still need to do testing, but from a look at the code I don't think these are needed.

These calls should be redundant based on the overall handling in push_undo_nodes. --- Still need to do testing, but from a look at the code I don't think these are needed.
Sean Kim added 1 commit 2024-06-26 01:27:04 +02:00
These calls should be redundant based on the overall handling in
push_undo_nodes.
Sean Kim added this to the Sculpt, Paint & Texture project 2024-06-26 01:27:08 +02:00
Hans Goudey reviewed 2024-06-26 02:25:27 +02:00
Hans Goudey left a comment
Member

Thanks for the cleanup. However I think I'd rather mark nodes as changed in the brushes, so removing the update tags from the undo pushing loop. Reasoning:

  • Same as the general transition to putting more code in each brush implementation-- reducing implicit coupling of different areas.
  • If we want, we can more easily detect if the brush actually changed anything before tagging updates.
  • We could more easily eagerly recalculate some caches like the bounds cache without affecting the node's tag.
  • Reducing the amount of time where the tag is "incorrect". i.e. put the tag right next to the thing that actually changes the data.
Thanks for the cleanup. However I think I'd rather mark nodes as changed in the brushes, so removing the update tags from the undo pushing loop. Reasoning: - Same as the general transition to putting more code in each brush implementation-- reducing implicit coupling of different areas. - If we want, we can more easily detect if the brush actually changed anything before tagging updates. - We could more easily eagerly recalculate some caches like the bounds cache without affecting the node's tag. - Reducing the amount of time where the tag is "incorrect". i.e. put the tag right next to the thing that actually changes the data.
Author
Member

Makes sense, wasn't sure which direction we were going here in terms of abstraction; I suppose the larger idea for push_undo_nodes is to also move the undo steps along with the node marking, right?

Makes sense, wasn't sure which direction we were going here in terms of abstraction; I suppose the larger idea for `push_undo_nodes` is to also move the undo steps along with the node marking, right?
Member

Yeah that was my thought. Though I'm a bit less sure of that after recent changes significantly decreased the undo system's overhead. We'd probably want to test if pushing undo data inside the brush evaluation node loop improved performance or not. On top of that there might be some opportunities for synergies between the two. Theoretically for nodes that need to gather(positions_eval, verts, positions) we could skip doing that another time when storing undo step data.

Yeah that was my thought. Though I'm a bit less sure of that after recent changes significantly decreased the undo system's overhead. We'd probably want to test if pushing undo data inside the brush evaluation node loop improved performance or not. On top of that there might be some opportunities for synergies between the two. Theoretically for nodes that need to `gather(positions_eval, verts, positions)` we could skip doing that another time when storing undo step data.
Author
Member

Closing this, since we aren't moving in this direction for the overall brush refactor.

Closing this, since we aren't moving in this direction for the overall brush refactor.
Sean Kim closed this pull request 2024-06-27 01:25:00 +02:00
Sean Kim deleted branch refactor-remove-positions-update 2024-07-24 02:11:28 +02:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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 Assignees
2 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#123760
No description provided.