Fix #113011: Leak of Anonymous Attributes #113053

Merged
Jacques Lucke merged 5 commits from mod_moder/blender:fix_att_leak into blender-v4.0-release 2023-09-29 21:23:24 +02:00

A lot of Capture Attribute nodes in sequence can create a huge number of attributes.
If these attributes are not used, they must be removed.

The speed of the Capture Attribute and Store Named Attribute nodes is now identical (for the better).
There are also no extra RAM usage now.

A lot of Capture Attribute nodes in sequence can create a huge number of attributes. If these attributes are not used, they must be removed. The speed of the Capture Attribute and Store Named Attribute nodes is now identical (for the better). There are also no extra RAM usage now.
Iliya Katushenock added the
Interest
Geometry Nodes
label 2023-09-29 12:12:01 +02:00
Iliya Katushenock changed title from WIP: Fix #113011: Leak of Anonymous Attributes to Fix #113011: Leak of Anonymous Attributes 2023-09-29 12:58:14 +02:00
Iliya Katushenock added this to the Nodes & Physics project 2023-09-29 12:58:21 +02:00
Iliya Katushenock requested review from Jacques Lucke 2023-09-29 12:58:41 +02:00
Jacques Lucke requested changes 2023-09-29 13:10:17 +02:00
Jacques Lucke left a comment
Member

Generally looks good. Can you provide some updated performance numbers for the .blend file in the bug report?

Generally looks good. Can you provide some updated performance numbers for the .blend file in the bug report?
@ -121,0 +135,4 @@
if (propagation_info.propagate(id.anonymous_id())) {
continue;
}
attributes->remove(id);
Member

Might need to be careful here, removing an attribute may invalidate data referenced by other AttributeIDRef (mainly the name). Better first gather the names of all attributes to remove, store them as std::string and then remove them in a second loop.

Might need to be careful here, removing an attribute may invalidate data referenced by other `AttributeIDRef` (mainly the name). Better first gather the names of all attributes to remove, store them as `std::string` and then remove them in a second loop.
mod_moder marked this conversation as resolved
Iliya Katushenock requested review from Jacques Lucke 2023-09-29 13:46:28 +02:00
Member

@blender-bot build

@blender-bot build
Jacques Lucke approved these changes 2023-09-29 13:59:27 +02:00
Hans Goudey reviewed 2023-09-29 15:48:23 +02:00
@ -119,2 +119,4 @@
}
static void clean_unused_attributes(const AnonymousAttributePropagationInfo &propagation_info,
const Set<AttributeIDRef> skip,
Member

const Set<AttributeIDRef> -> const Set<AttributeIDRef> &

`const Set<AttributeIDRef>` -> `const Set<AttributeIDRef> &`
mod_moder marked this conversation as resolved
Member

Can you rebase the patch for the release branch?

Can you rebase the patch for the release branch?
Iliya Katushenock force-pushed fix_att_leak from 41a08d008c to b95a7f68f4 2023-09-29 16:13:22 +02:00 Compare
Iliya Katushenock changed title from Fix #113011: Leak of Anonymous Attributes to Fix #113011: Leak of Anonymous Attributes 2023-09-29 16:13:31 +02:00
mod_moder changed target branch from main to blender-v4.0-release 2023-09-29 16:13:33 +02:00
Iliya Katushenock added 1 commit 2023-09-29 16:14:09 +02:00
Jacques Lucke merged commit 1c4c76ccbf into blender-v4.0-release 2023-09-29 21:23:24 +02:00
Iliya Katushenock deleted branch fix_att_leak 2023-09-29 21:24:41 +02:00
Sign in to join this conversation.
No reviewers
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 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#113053
No description provided.