Regression: Importing of collada model with instances became a LOT slower since 2.80 (practically freezing) #104108

Open
opened 2023-01-23 23:51:05 +01:00 by Sarah Smith · 22 comments

System Information
Operating system: windows 10
Graphics card: geforce gtx 1070

Blender Version
Broken: blender 3.4.1
Worked: 2.80

Short description of error
Importing of collada model makes Blender not respond anymore with high CPU usage in windows task manager (and never finishes no matter how long you wait)

Exact steps for others to reproduce the error

  • import attached collada file
  • Blender not respond anymore with high CPU usage in windows task manager (and never finishes no matter how long you wait)

Link to model file:

https://3dwarehouse.sketchup.com/model/08a9d48a-9229-4711-b9bb-23adc6c5e98d/Cruisn-Exotica-arcade-game-Dual

doubleexotica.zip

**System Information** Operating system: windows 10 Graphics card: geforce gtx 1070 **Blender Version** Broken: blender 3.4.1 Worked: 2.80 **Short description of error** Importing of collada model makes Blender not respond anymore with high CPU usage in windows task manager (and never finishes no matter how long you wait) **Exact steps for others to reproduce the error** - import attached collada file - Blender not respond anymore with high CPU usage in windows task manager (and never finishes no matter how long you wait) Link to model file: https://3dwarehouse.sketchup.com/model/08a9d48a-9229-4711-b9bb-23adc6c5e98d/Cruisn-Exotica-arcade-game-Dual [doubleexotica.zip](https://archive.blender.org/developer/F14190077/doubleexotica.zip)
Author

Added subscriber: @blender.girl

Added subscriber: @blender.girl
Author

The model can be imported with meshlab

https://www.meshlab.net/

The model can be imported with meshlab https://www.meshlab.net/
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

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

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Can confirm.

2.80 was able to import this, checking...

Can confirm. 2.80 was able to import this, checking...
Member

Added subscribers: @mont29, @GaiaClary

Added subscribers: @mont29, @GaiaClary
Member

Hm, cant find any obvious code changes that might have caused this on first sight.
I assume though this has something to do with adding objects to collections (the Collada importer uses BKE_collection_object_add_from possibly haven gotten a lot slower...[probably for good reasons though])
I hacked some parts to speed the process up (skipping nested children, using BKE_collection_object_add_notest, ...) and the file does import then...
That being said, there is probably also something wrong with either the .dae or the way blenders Collada importer handles instances.
Like I said, Importing into 2.80 works, but still, I get a whole bunch of duplicates here (the file result in over 30.000 objects (a lot of them are seemingly duplicates).

@GaiaClary , @mont29 might know more...

Hm, cant find any obvious code changes that might have caused this on first sight. I assume though this has something to do with adding objects to collections (the Collada importer uses `BKE_collection_object_add_from` possibly haven gotten a lot slower...[probably for good reasons though]) I hacked some parts to speed the process up (skipping nested children, using `BKE_collection_object_add_notest`, ...) and the file **does** import then... That being said, there is probably also something wrong with either the .dae or the way blenders Collada importer handles instances. Like I said, Importing into 2.80 works, but still, I get a whole bunch of duplicates here (the file result in over 30.000 objects (a lot of them are seemingly duplicates). @GaiaClary , @mont29 might know more...
Philipp Oeser changed title from Importing of collada model makes Blender not respond anymore to Regression: Importing of collada model with instances became a LOT slower since 2.80 (practically freezing) 2023-01-24 14:20:36 +01:00

30k objects are indeed not yet properly supported in general... However, changes like D17016: Use a hash for Collection.gobject lookup, improving speed of linking objects may 'solve' these kind of issues, or at least make them much less sensitive.

30k objects are indeed not yet properly supported in general... However, changes like [D17016: Use a hash for Collection.gobject lookup, improving speed of linking objects](https://archive.blender.org/developer/D17016) may 'solve' these kind of issues, or at least make them much less sensitive.
Author

In #104108#1479147, @lichtwerk wrote:
Like I said, Importing into 2.80 works, but still, I get a whole bunch of duplicates here (the file result in over 30.000 objects (a lot of them are seemingly duplicates).

@GaiaClary , @mont29 might know more...

I think all faces are twice present since on some other models of that website I had to enable backface culling in Blender. So that explains the duplicates (I think)

> In #104108#1479147, @lichtwerk wrote: > Like I said, Importing into 2.80 works, but still, I get a whole bunch of duplicates here (the file result in over 30.000 objects (a lot of them are seemingly duplicates). > > @GaiaClary , @mont29 might know more... I think all faces are twice present since on some other models of that website I had to enable backface culling in Blender. So that explains the duplicates (I think)
Author

What about adding an importer to Blender in python as an official add-on using this very well updated pycollada python library?

https://github.com/pycollada/pycollada

What about adding an importer to Blender in python as an official add-on using this very well updated pycollada python library? https://github.com/pycollada/pycollada

Added subscriber: @RomboutVersluijs

Added subscriber: @RomboutVersluijs

@blender.girl
Did you look at the bottom of that github , it links to an existing importer/exporter
https://github.com/skrat/bpycollada

@blender.girl Did you look [at the bottom of that github ](https://github.com/pycollada/pycollada#:~:text=COLLADA%20Import%2FExport-,blender%20collada%20importer,-Meshtool), it links to an existing importer/exporter https://github.com/skrat/bpycollada
Author

Yes, but I can't install it on windows. There is an github issue and I have the same problem. Do you know how to install it?

Yes, but I can't install it on windows. There is an github issue and I have the same problem. Do you know how to install it?
Contributor

Added subscriber: @scurest

Added subscriber: @scurest
Contributor

It's 11 years old, it's not going to work with modern Blender.

It's 11 years old, it's not going to work with modern Blender.
Member

In #104108#1479300, @blender.girl wrote:
What about adding an importer to Blender in python as an official add-on using this very well updated pycollada python library?

https://github.com/pycollada/pycollada

I would think that If this freeze on import is an issue related to low level import functions in Blender, then i doubt that a python based importer would improve the situation. I'd rather think a python importer would be even slower then. But all of that is just guessing. also, 30000 imported objects sounds like some issues with list processing in the importer 🤔 as it is not made for such a huge amount of imported items... hmmm

> In #104108#1479300, @blender.girl wrote: > What about adding an importer to Blender in python as an official add-on using this very well updated pycollada python library? > > https://github.com/pycollada/pycollada I would think that If this freeze on import is an issue related to low level import functions in Blender, then i doubt that a python based importer would improve the situation. I'd rather think a python importer would be even slower then. But all of that is just guessing. also, 30000 imported objects sounds like some issues with list processing in the importer 🤔 as it is not made for such a huge amount of imported items... hmmm
Member

In #104108#1479297, @blender.girl wrote:
I think all faces are twice present since on some other models of that website I had to enable backface culling in Blender. So that explains the duplicates (I think)

This is not duplicate faces, we have a lot of duplicate objects
For example, we have 369 instances of group_14, we have 369 instances of group_10 etc etc, all parented under 369 instances of instance_0
{F14196210 size=full}

So like I said, to investigate further, I would check the collada file for wrong usage OR check blender importer code (in DocumentImporter::create_instance_node)
There is also the following comment (that is either outdated, or gives us a hint that 979b06f739 was not meant to be fully functional yet)

/* XXX instance_node is not supported yet */
> In #104108#1479297, @blender.girl wrote: > I think all faces are twice present since on some other models of that website I had to enable backface culling in Blender. So that explains the duplicates (I think) This is not duplicate faces, we have a lot of duplicate **objects** For example, we have 369 instances of `group_14`, we have 369 instances of `group_10` etc etc, all parented under 369 instances of `instance_0` {[F14196210](https://archive.blender.org/developer/F14196210/image.png) size=full} So like I said, to investigate further, I would check the collada file for wrong usage OR check blender importer code (in `DocumentImporter::create_instance_node`) There is also the following comment (that is either outdated, or gives us a hint that 979b06f739 was not meant to be fully functional yet) ``` /* XXX instance_node is not supported yet */ ```
Member

12afa64de9 is related as well.
I would really check on the recursive nature of DocumentImporter::create_instance_node

12afa64de9 is related as well. I would really check on the recursive nature of `DocumentImporter::create_instance_node`
Author

I would like to request a progress bar or information window that is shown during the importing of a model. I imported today a 90 MB Collada model (which successfully worked) but it took several minutes to import.

It would be useful to have some feedback to the user so we know the importing is still busy. I thought Blender crashed but it was not, because the importing took several minutes.

I would like to request a progress bar or information window that is shown during the importing of a model. I imported today a 90 MB Collada model (which successfully worked) but it took several minutes to import. It would be useful to have some feedback to the user so we know the importing is still busy. I thought Blender crashed but it was not, because the importing took several minutes.

@blender.girl please do not diverge from topic, and do not use the tracker for feature requests, thanks.

@blender.girl please do not diverge from topic, and do not use the tracker for feature requests, thanks.
Bastien Montagne added this to the Pipeline, Assets & IO project 2023-02-09 15:39:30 +01:00
Bastien Montagne modified the project from Pipeline, Assets & IO to Core 2023-02-09 15:42:54 +01:00
Bastien Montagne removed this from the Core project 2023-02-09 18:20:29 +01:00
Philipp Oeser removed the
Interest
Pipeline, Assets & IO
label 2023-02-10 08:53:58 +01:00

#104553 has been committed today, would be good to know if it partially helps here?

#104553 has been committed today, would be good to know if it partially helps here?
Bastien Montagne added
Status
Needs Information from User
and removed
Status
Confirmed
labels 2023-03-07 16:38:41 +01:00
Member

OK, so we have a bit of speedup

  • current main import this in 2min 07sec
  • before 104553 it was ~2hrs (so can confirm the 50x speedup mentioned)

BUT: does this really mean the issue is gone? Dont think so, the 17MB should be imported in the range of seconds (not minutes).

(also still think there is something wrong with the importer itself, see #104108 (comment)).

Will confirm again.

OK, so we have a bit of speedup - current main import this in 2min 07sec - before 104553 it was ~2hrs (so can confirm the 50x speedup mentioned) BUT: does this really mean the issue is gone? Dont think so, the 17MB should be imported in the range of seconds (not minutes). (also still think there is something wrong with the importer itself, see https://projects.blender.org/blender/blender/issues/104108#issuecomment-78548). Will confirm again.
Philipp Oeser added
Status
Confirmed
and removed
Status
Needs Information from User
Interest
Core
labels 2023-03-17 16:36:24 +01: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
6 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#104108
No description provided.