Slow performance importing USD scene with many objects sharing the same basename #110483

Closed
opened 2023-07-26 04:45:47 +02:00 by Bin-Zhao · 2 comments

System Information
Operating system: Windows 10
Graphics card: GTX 1070

Blender Version
Broken: 3.6
Worked: None

Short description of error

It takes a long time to load some particular USD scenes.

Exact steps for others to reproduce the error

Download this file and try to import limits_32.usdc. It takes longer than 30 seconds for USD import job to finish. limits_48.usdc takes even longer , 4min 33sec. For comparison, both Omniverse 2023.1 and Tellusim can import limits_48.usdc in less than 20 and 5 seconds, respectively, as reported here

I have profiled the process and identified one big bottleneck is id_sort_by_name function. For each object created, id_sort_by_name needs to search a long linked list backward to find a place for the newly created object. The search is supposed to be fast as the new object typically has larger extension number. However, the search is based on alphabet comparison so a smaller extension number , e.g. 9999 could be bigger alphabetically than 13223. I believe this had incurred a O(N^2) penalty in id_sort_by_name.

**System Information** Operating system: Windows 10 Graphics card: GTX 1070 **Blender Version** Broken: 3.6 Worked: None **Short description of error** It takes a long time to load some particular USD scenes. **Exact steps for others to reproduce the error** Download [this file](https://tellusim.com/download/import/limits.zip) and try to import ```limits_32.usdc```. It takes longer than 30 seconds for USD import job to finish. ```limits_48.usdc``` takes even longer , 4min 33sec. For comparison, both **Omniverse 2023.1** and **Tellusim** can import ```limits_48.usdc``` in less than 20 and 5 seconds, respectively, as reported [here](https://tellusim.com/import/) I have profiled the process and identified one big bottleneck is ```id_sort_by_name``` function. For each object created, ```id_sort_by_name``` needs to search a long linked list backward to find a place for the newly created object. The search is supposed to be fast as the new object typically has larger extension number. However, the search is based on alphabet comparison so a smaller extension number , e.g. 9999 could be bigger alphabetically than 13223. I believe this had incurred a O(N^2) penalty in ```id_sort_by_name```.
Bin-Zhao added the
Type
Report
Status
Needs Triage
Priority
Normal
labels 2023-07-26 04:45:48 +02:00

@mont29 Do you think, this is something that can be resolved easily?

@mont29 Do you think, this is something that can be resolved easily?

This is a very well known issue yes. Historically Blender was not designed to handle tens of thousands of data-blocks...

The generic task covering these cases is #73359, not sure if @aras_p also had more specific tasks/patches too?

Thanks for the report, but don't think it's worth keeping it open, this is really a known issue involving design and development, not a bug.

This is a very well known issue yes. Historically Blender was not designed to handle tens of thousands of data-blocks... The generic task covering these cases is #73359, not sure if @aras_p also had more specific tasks/patches too? Thanks for the report, but don't think it's worth keeping it open, this is really a known issue involving design and development, not a bug.
Blender Bot added
Status
Archived
and removed
Status
Needs Triage
labels 2023-08-03 11:11:29 +02:00
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#110483
No description provided.