Removing Libraries is very slow #71894

Closed
opened 2019-11-25 17:14:04 +01:00 by Andy · 4 comments

System Information
Operating system: Windows 10

Blender Version
Broken:
2.81 (sub 16), branch: master, commit date: 2019-11-18 12:53, hash: 115a5bf65a, type: Release

Short:
Removing (renaming to "", such that they are removed when saving) lots of libraries is very slow.

Reproduction:

  • Save "Library Cube.blend" and "Library User.blend" in the same folder
  • (Make sure to create a new folder, because the script creates lots of "Library Cube.blend" copies!)
  • Open "Library User.blend"
  • Execute the "LibraryUsage.py" script
  • (On my computer "number_of_library_copies = 10" worked)
  • (On my computer "number_of_library_copies = 100" took extremely long (I killed the process))

Remark:
The clear_libraries() function could be executed outside of the loop to get rid of the issue in this example. However, I discovered this issue when I was dealing with a batch processing script where even the clean up at the very end takes forever. The only practically viable solution is to kill the process.

Library User.blend
Library Cube.blend

**System Information** Operating system: Windows 10 **Blender Version** Broken: 2.81 (sub 16), branch: master, commit date: 2019-11-18 12:53, hash: 115a5bf65a6b, type: Release Short: Removing (renaming to "", such that they are removed when saving) lots of libraries is very slow. Reproduction: - Save "Library Cube.blend" and "Library User.blend" in the same folder - (Make sure to create a new folder, because the script creates lots of "Library Cube.blend" copies!) - Open "Library User.blend" - Execute the "LibraryUsage.py" script - (On my computer "number_of_library_copies = 10" worked) - (On my computer "number_of_library_copies = 100" took extremely long (I killed the process)) Remark: The clear_libraries() function could be executed outside of the loop to get rid of the issue in this example. However, I discovered this issue when I was dealing with a batch processing script where even the clean up at the very end takes forever. The only practically viable solution is to kill the process. [Library User.blend](https://archive.blender.org/developer/F8165730/Library_User.blend) [Library Cube.blend](https://archive.blender.org/developer/F8165731/Library_Cube.blend)
Author

Added subscriber: @DeepBlender

Added subscriber: @DeepBlender
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

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

Changed status from 'Needs Triage' to: 'Archived'
Jacques Lucke self-assigned this 2020-01-08 12:55:31 +01:00
Member

In my tests the runtime seems to be growing approximately quadratic in number_of_library_copies. On my hardware the script takes 30s when I set the number to 1000. Why the quadratic runtime complexity is bad, it is expected currently. Therefore, I don't think this is a bug.

In my tests the runtime seems to be growing approximately quadratic in `number_of_library_copies`. On my hardware the script takes 30s when I set the number to `1000`. Why the quadratic runtime complexity is bad, it is expected currently. Therefore, I don't think this is a bug.
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
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
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#71894
No description provided.