Mantis is down at the moment. Could you please post the step file here, or if it is too big, send it to my email?wmayer wrote:Today I found a major performance regression with the new tree view. In issue #1999 you will find the file FreeCadProblem.step which takes 15 minutes to load in release mode.
#619 Made TreeView stable
-
- Veteran
- Posts: 2190
- Joined: Tue Jan 03, 2017 10:55 am
Re: #619 Made TreeView stable
Re: #619 Made TreeView stable
Here it is.
- Attachments
-
- FreeCadProblem.7z
- (182.53 KiB) Downloaded 74 times
-
- Veteran
- Posts: 2190
- Joined: Tue Jan 03, 2017 10:55 am
Re: #619 Made TreeView stable
It is because of the cyclic check on adding object. This is the worst case I've predicated, all children first. But obviously I am wrong about the performance impact. Only 900 object, and it's that slow. I've submitted the fix.wmayer wrote:Here it is.
Re: #619 Made TreeView stable
Thanks for looking at this issue. Unfortunately your patch doesn't change anything. The load time of the STEP file is still at ~15 minutes.
-
- Veteran
- Posts: 2190
- Joined: Tue Jan 03, 2017 10:55 am
Re: #619 Made TreeView stable
That's odd. You're right, it didn't make a difference, because I reverted the change and it is still fast on my machine! How did you load the file, by just opening it using FC?wmayer wrote:Thanks for looking at this issue. Unfortunately your patch doesn't change anything. The load time of the STEP file is still at ~15 minutes.
-
- Veteran
- Posts: 2190
- Joined: Tue Jan 03, 2017 10:55 am
Re: #619 Made TreeView stable
Even debug build is fast. What OS are you using?
Re: #619 Made TreeView stable
By drag'n'drop into the FreeCAD main window. Reading and transferring the STEP is fast (which isn't influenced by the tree) but when adding the part objects to the part container then this step is very slow (something like O(n^2) I guess).
IMO, the problem is inside DocumentItem::populateItem where you first remove all children of an item and then add them again step-by-step. And this is also done when any kind of property has been changed -- not only link properties. This makes it somewhat inefficient and would explain the quadratic runtime.
Btw,
IMO, the problem is inside DocumentItem::populateItem where you first remove all children of an item and then add them again step-by-step. And this is also done when any kind of property has been changed -- not only link properties. This makes it somewhat inefficient and would explain the quadratic runtime.
Btw,
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10680 +1 (Git)
Build type: Release
Branch: pr670
Hash: 802c3480fbbc6445331511633ae8ab8fd52413e8
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
- DeepSOIC
- Veteran
- Posts: 7896
- Joined: Fri Aug 29, 2014 12:45 am
- Location: used to be Saint-Petersburg, Russia
Re: #619 Made TreeView stable
I have tried opening the step in:
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10665 (Git)
Build type: Release
Branch: master
Hash: 47847513a85ff6615774ef628230f79e37471daf
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
First time, progress bar filled quite quickly, but then it started from beginning, and looked like stuck for about a minute. Then I just killed FreeCAD.
I opened the step by double-clicking file (i.e., like through command line FreeCAD path\to\file.step).
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10665 (Git)
Build type: Release
Branch: master
Hash: 47847513a85ff6615774ef628230f79e37471daf
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
First time, progress bar filled quite quickly, but then it started from beginning, and looked like stuck for about a minute. Then I just killed FreeCAD.
I opened the step by double-clicking file (i.e., like through command line FreeCAD path\to\file.step).
-
- Veteran
- Posts: 2190
- Joined: Tue Jan 03, 2017 10:55 am
Re: #619 Made TreeView stable
I just drag and drop, and it is fast. In Debug mode, it took less than 20 second on my machine. So it is a Windows issue, that will be very unexpected if so. I'll try and see.wmayer wrote:By drag'n'drop into the FreeCAD main window. Reading and transferring the STEP is fast (which isn't influenced by the tree) but when adding the part objects to the part container then this step is very slow (something like O(n^2) I guess).
Yes, it is a two stage thing. The second stage locks the GUI, and took about 20 seconds on my machine.DeepSOIC wrote:First time, progress bar filled quite quickly, but then it started from beginning, and looked like stuck for about a minute. Then I just killed FreeCAD
-
- Veteran
- Posts: 2190
- Joined: Tue Jan 03, 2017 10:55 am
Re: #619 Made TreeView stable
Yep, it is happening on my Windows, too. Six minutes now, still no response. Ahh...I hate Windows. It's probably Qt's fault though. I'll try to avoid take all children and see.