Compositor - Extreme performance degradation requiring Blender restart after approx. 1 minute #118459

Open
opened 2024-02-19 16:11:39 +01:00 by michael campbell · 3 comments

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 537.58

Blender Version
Broken: version: 4.2.0 Alpha, branch: main, commit date: 2024-02-16 21:52, hash: 8b6d145a6b04
Worked: (unknown)

Short description of error
Within one minute Blender requires restart due to severe performance degradation under below circumstances if image editor is set to viewer or compositor backdrop is enabled.

Exact steps for others to reproduce the error
with all of the below, open with the 'load ui' option enabled for easier replication.

test 1 (demonstrates issue not present if only updating the image datablocks filepath)

  1. open 'only update image is fine.blend'
  2. run the script
  3. start playback, take a note of the fps, then leave playing for 30 seconds.
  4. image will be updating in the image editor's viewer mode and compositor's backdrop.
  5. check fps (should match original)

test 2 (demonstrating issue is not present with only calling render.render)

  1. open 'render.redner on own is fine.blend'
  2. run the script
  3. start playback, take a note of the fps, then leave playing for 30 seconds.
  4. compositor is calculating and the file output node is generating files to the //out directory.
  5. check fps (should match original)

test 3 (demonstrates the bug)

  1. open 'repeated call to render.render with image update leads to performance degredation.blend'
  2. run the script and make sure the image editor is not set to viewer, and the compositor backdrop is disabled.
  3. start playback, take a note of the fps, then leave playing for 30 seconds.
  4. check fps. Should match original with no performance degredation, even though the compositor was being executed as you can tell by the images being generated into the //out folder.
  5. now either change the image editor to viewer node, or turn on the compositor's backdrop
  6. start playback, take a note of the fps, then leave playing for 30 seconds.
  7. Blender is now unusably slow as a result of enabling the backdrop or viewer mode of the image editor, even though the actual work being performed by the compositor has not changed.
  8. Open one of the previous blend files without restarting blender.
  9. run the script
  10. Playback is still slow even though the handlers weren't persistent between file opens
  11. Restart Blender
  12. test one of the first two files again and performance will be back.

Perhaps some image datablock variable is not being cleared if render.render is called directly after changing the image filepath, leading to multiple calls to the same function when it only needs to happen once?

**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 537.58 **Blender Version** Broken: version: 4.2.0 Alpha, branch: main, commit date: 2024-02-16 21:52, hash: `8b6d145a6b04` Worked: (unknown) **Short description of error** Within one minute Blender requires restart due to severe performance degradation under below circumstances if image editor is set to viewer or compositor backdrop is enabled. **Exact steps for others to reproduce the error** with all of the below, open with the 'load ui' option enabled for easier replication. test 1 (demonstrates issue not present if only updating the image datablocks filepath) 1. open 'only update image is fine.blend' 2. run the script 3. start playback, take a note of the fps, then leave playing for 30 seconds. 4. image will be updating in the image editor's viewer mode and compositor's backdrop. 5. check fps (should match original) test 2 (demonstrating issue is not present with only calling render.render) 1. open 'render.redner on own is fine.blend' 2. run the script 3. start playback, take a note of the fps, then leave playing for 30 seconds. 4. compositor is calculating and the file output node is generating files to the //out directory. 4. check fps (should match original) test 3 (demonstrates the bug) 1. open 'repeated call to render.render with image update leads to performance degredation.blend' 2. run the script and make sure the image editor is not set to viewer, and the compositor backdrop is disabled. 3. start playback, take a note of the fps, then leave playing for 30 seconds. 4. check fps. Should match original with no performance degredation, even though the compositor was being executed as you can tell by the images being generated into the //out folder. 5. now either change the image editor to viewer node, or turn on the compositor's backdrop 6. start playback, take a note of the fps, then leave playing for 30 seconds. 7. Blender is now unusably slow as a result of enabling the backdrop or viewer mode of the image editor, even though the actual work being performed by the compositor has not changed. 8. Open one of the previous blend files without restarting blender. 9. run the script 10. Playback is still slow even though the handlers weren't persistent between file opens 11. Restart Blender 12. test one of the first two files again and performance will be back. Perhaps some image datablock variable is not being cleared if render.render is called directly after changing the image filepath, leading to multiple calls to the same function when it only needs to happen once?
michael campbell added the
Status
Needs Triage
Priority
Normal
Type
Report
labels 2024-02-19 16:11:40 +01:00
michael campbell changed title from Extreme performance degradation requiring Blender restart after approx. 1 minute to Compositor - Extreme performance degradation requiring Blender restart after approx. 1 minute 2024-02-20 18:09:17 +01:00
Member

Thanks for the report. I can confirm the performance degradation when image updates per frame and render call is sent.
cc @OmarEmaraDev

Thanks for the report. I can confirm the performance degradation when image updates per frame and render call is sent. cc @OmarEmaraDev
Member

I do not get performance degradation, but I get a hard crash and a few memory leaks. So we could start with that.

Running with memory debugger:

copy_data len: 248 0x76e338ca1040
dupli_alloc len: 0 0x76e30ec10478
idp_generic_copy len: 136 0x76e371a6d698
node_copy_with_mapping len: 1224 0x76e32e7c2e40
node_socket_copy len: 312 0x76e330e96ec0
panel_init len: 0 0x76e30ec10b38
Memoryblock GLShader: Freeing memory after the leak detector has run. This can happen when using static variables in C++ that are defined outside of functions. To fix this error, use the 'construct on first use' idiom.
Memoryblock GLShaderInterface: Freeing memory after the leak detector has run. This can happen when using static variables in C++ that are defined outside of functions. To fix this error, use the 'construct on first use' idiom.
Memoryblock GLTexture: Freeing memory after the leak detector has run. This can happen when using static variables in C++ that are defined outside of functions. To fix this error, use the 'construct on first use' idiom.
Memoryblock GLUniformBuf: Freeing memory after the leak detector has run. This can happen when using static variables in C++ that are defined outside of functions. To fix this error, use the 'construct on first use' idiom.
Memoryblock name_buffer: Freeing memory after the leak detector has run. This can happen when using static variables in C++ that are defined outside of functions. To fix this error, use the 'construct on first use' idiom.
Memoryblock source/blender/blenlib/BLI_vector.hh:997: Freeing memory after the leak detector has run. This can happen when using static variables in C++ that are defined outside of functions. To fix this error, use the 'construct on first use' idiom.
I do not get performance degradation, but I get a hard crash and a few memory leaks. So we could start with that. Running with memory debugger: ``` copy_data len: 248 0x76e338ca1040 dupli_alloc len: 0 0x76e30ec10478 idp_generic_copy len: 136 0x76e371a6d698 node_copy_with_mapping len: 1224 0x76e32e7c2e40 node_socket_copy len: 312 0x76e330e96ec0 panel_init len: 0 0x76e30ec10b38 Memoryblock GLShader: Freeing memory after the leak detector has run. This can happen when using static variables in C++ that are defined outside of functions. To fix this error, use the 'construct on first use' idiom. Memoryblock GLShaderInterface: Freeing memory after the leak detector has run. This can happen when using static variables in C++ that are defined outside of functions. To fix this error, use the 'construct on first use' idiom. Memoryblock GLTexture: Freeing memory after the leak detector has run. This can happen when using static variables in C++ that are defined outside of functions. To fix this error, use the 'construct on first use' idiom. Memoryblock GLUniformBuf: Freeing memory after the leak detector has run. This can happen when using static variables in C++ that are defined outside of functions. To fix this error, use the 'construct on first use' idiom. Memoryblock name_buffer: Freeing memory after the leak detector has run. This can happen when using static variables in C++ that are defined outside of functions. To fix this error, use the 'construct on first use' idiom. Memoryblock source/blender/blenlib/BLI_vector.hh:997: Freeing memory after the leak detector has run. This can happen when using static variables in C++ that are defined outside of functions. To fix this error, use the 'construct on first use' idiom. ```

@OmarEmaraDev perhaps the performance issue is OS specific.

@OmarEmaraDev perhaps the performance issue is OS specific.
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#118459
No description provided.