STEP file read might be crazy long ...

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
vejmarie
Posts: 713
Joined: Mon Jan 04, 2016 4:52 pm
Location: Somewhere between France, USA and Taiwan
Contact:

Re: STEP file read might be crazy long ...

Post by vejmarie »

sgrogan wrote:
vejmarie wrote:Which commit is your build using ? Probably not the latest one (sgrogan is going to "kick me")
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.9842 +15 (Git)
Build type: Release
Branch: step
Hash: 304a2622474311d990a3fe99be233e78af612d4f
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
No worries, what is the best to build, the HEAD of step on your fork? It's trivial to do the test builds, now that I have built your OCCT patch.
My latest patch has been integrated upstream. So you can recompile the stuff, and we shall have an opening time pretty descent now.
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: STEP file read might be crazy long ...

Post by easyw-fc »

sgrogan wrote: No worries, what is the best to build, the HEAD of step on your fork? .
Hi @sgrogan have you get a chance to build the latest release with @vejmarie TBB?
Thx
Maurice
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: STEP file read might be crazy long ...

Post by sgrogan »

easyw-fc wrote: Hi @sgrogan have you get a chance to build the latest release with @vejmarie TBB?
Thx
Maurice
Sorry, not yet.
Can anyone give a hint how to hack OCCT's Standard_Version.hxx if it's the correct place, to make the OCCT version available in About FreeCAD. I've got OCCT7 with and without TBB and vejmarie's fork with TBB. I need a way to differentiate these builds (in FreeCAD).
"fight the good fight"
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: STEP file read might be crazy long ...

Post by easyw-fc »

vejmarie wrote: My latest patch has been integrated upstream. So you can recompile the stuff, and we shall have an opening time pretty descent now.
Hi,
I'm testing again with FC 0.17.9933 64b standard build (without TBB vejmarie patch) but with the update timer to the progress bar
in win10-64b
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.9933 (Git)
Build type: Release
Branch: master
Hash: 6c3b78e97bbb8653e1189038c99682becef71626
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
loading time = 919.57400012s
displaying time = 503.263000011s
so loading time has been improved, also without MT patch, but displaying time has dropped down drastically from...
OLD test had:
FC 9802 64b
loading time = 1236.62700009s
displaying time = 92.0999999046s

Has been changed something in the loading mode?
I also have a lot of errors during loading time that were not present on FC 9802 64b
loading...
Cannot compute Inventor representation for the shape of Part__Feature148.
Cannot compute Inventor representation for the shape of Part__Feature391.
Cannot compute Inventor representation for the shape of Part__Feature392.
Cannot compute Inventor representation for the shape of Part__Feature393.
Cannot compute Inventor representation for the shape of Part__Feature394.
Cannot compute Inventor representation for the shape of Part__Feature418.
Cannot compute Inventor representation for the shape of Part__Feature419.
Cannot compute Inventor representation for the shape of Part__Feature420.
Cannot compute Inventor representation for the shape of Part__Feature421.
Cannot compute Inventor representation for the shape of Part__Feature445.
Cannot compute Inventor representation for the shape of Part__Feature446.
Cannot compute Inventor representation for the shape of Part__Feature447.
Cannot compute Inventor representation for the shape of Part__Feature448.
Cannot compute Inventor representation for the shape of Part__Feature472.
Cannot compute Inventor representation for the shape of Part__Feature473.
Cannot compute Inventor representation for the shape of Part__Feature474.
Cannot compute Inventor representation for the shape of Part__Feature475.
Cannot compute Inventor representation for the shape of Part__Feature499.
Cannot compute Inventor representation for the shape of Part__Feature500.
Cannot compute Inventor representation for the shape of Part__Feature501.
Cannot compute Inventor representation for the shape of Part__Feature502.
Cannot compute Inventor representation for the shape of Part__Feature526.
Cannot compute Inventor representation for the shape of Part__Feature527.
Cannot compute Inventor representation for the shape of Part__Feature528.
Cannot compute Inventor representation for the shape of Part__Feature529.
Cannot compute Inventor representation for the shape of Part__Feature889.
Cannot compute Inventor representation for the shape of Part__Feature890.
Cannot compute Inventor representation for the shape of Part__Feature929.
Cannot compute Inventor representation for the shape of Part__Feature971.
Cannot compute Inventor representation for the shape of Part__Feature1001.
Cannot compute Inventor representation for the shape of Part__Feature1011.
Cannot compute Inventor representation for the shape of Part__Feature1013.
Cannot compute Inventor representation for the shape of Part__Feature1014.
Cannot compute Inventor representation for the shape of Part__Feature1019.
Cannot compute Inventor representation for the shape of Part__Feature1026.
Cannot compute Inventor representation for the shape of Part__Feature1249.
Cannot compute Inventor representation for the shape of Part__Feature1250.
Cannot compute Inventor representation for the shape of Part__Feature1251.
Cannot compute Inventor representation for the shape of Part__Feature1252.
Cannot compute Inventor representation for the shape of Part__Feature1313.
Cannot compute Inventor representation for the shape of Part__Feature1314.
Cannot compute Inventor representation for the shape of Part__Feature1315.
Cannot compute Inventor representation for the shape of Part__Feature1316.
Cannot compute Inventor representation for the shape of Part__Feature1317.
Cannot compute Inventor representation for the shape of Part__Feature1318.
Cannot compute Inventor representation for the shape of Part__Feature1319.
Cannot compute Inventor representation for the shape of Part__Feature1320.
Cannot compute Inventor representation for the shape of Part__Feature1321.
Cannot compute Inventor representation for the shape of Part__Feature1513.
Cannot compute Inventor representation for the shape of Part__Feature971.
Cannot compute Inventor representation for the shape of Part__Feature1026.
Cannot compute Inventor representation for the shape of Part__Feature1313.
Cannot compute Inventor representation for the shape of Part__Feature1314.
Cannot compute Inventor representation for the shape of Part__Feature1315.
Cannot compute Inventor representation for the shape of Part__Feature1316.
Cannot compute Inventor representation for the shape of Part__Feature1317.
Cannot compute Inventor representation for the shape of Part__Feature1318.
Cannot compute Inventor representation for the shape of Part__Feature1319.
Cannot compute Inventor representation for the shape of Part__Feature1320.
Cannot compute Inventor representation for the shape of Part__Feature1321.
Cannot compute Inventor representation for the shape of Part__Feature929.
Cannot compute Inventor representation for the shape of Part__Feature1001.
Cannot compute Inventor representation for the shape of Part__Feature1011.
Cannot compute Inventor representation for the shape of Part__Feature1013.
Cannot compute Inventor representation for the shape of Part__Feature1014.
Cannot compute Inventor representation for the shape of Part__Feature1019.
Cannot compute Inventor representation for the shape of Part__Feature1249.
Cannot compute Inventor representation for the shape of Part__Feature1250.
Cannot compute Inventor representation for the shape of Part__Feature1251.
Cannot compute Inventor representation for the shape of Part__Feature1252.
Cannot compute Inventor representation for the shape of Part__Feature148.
Cannot compute Inventor representation for the shape of Part__Feature1513.
Cannot compute Inventor representation for the shape of Part__Feature391.
Cannot compute Inventor representation for the shape of Part__Feature392.
Cannot compute Inventor representation for the shape of Part__Feature393.
Cannot compute Inventor representation for the shape of Part__Feature394.
Cannot compute Inventor representation for the shape of Part__Feature418.
Cannot compute Inventor representation for the shape of Part__Feature419.
Cannot compute Inventor representation for the shape of Part__Feature420.
Cannot compute Inventor representation for the shape of Part__Feature421.
Cannot compute Inventor representation for the shape of Part__Feature445.
Cannot compute Inventor representation for the shape of Part__Feature446.
Cannot compute Inventor representation for the shape of Part__Feature447.
Cannot compute Inventor representation for the shape of Part__Feature448.
Cannot compute Inventor representation for the shape of Part__Feature472.
Cannot compute Inventor representation for the shape of Part__Feature473.
Cannot compute Inventor representation for the shape of Part__Feature474.
Cannot compute Inventor representation for the shape of Part__Feature475.
Cannot compute Inventor representation for the shape of Part__Feature499.
Cannot compute Inventor representation for the shape of Part__Feature500.
Cannot compute Inventor representation for the shape of Part__Feature501.
Cannot compute Inventor representation for the shape of Part__Feature502.
Cannot compute Inventor representation for the shape of Part__Feature526.
Cannot compute Inventor representation for the shape of Part__Feature527.
Cannot compute Inventor representation for the shape of Part__Feature528.
Cannot compute Inventor representation for the shape of Part__Feature529.
Cannot compute Inventor representation for the shape of Part__Feature889.
Cannot compute Inventor representation for the shape of Part__Feature890.
loading time = 919.57400012s
displaying time = 503.263000011s
Maurice
User avatar
vejmarie
Posts: 713
Joined: Mon Jan 04, 2016 4:52 pm
Location: Somewhere between France, USA and Taiwan
Contact:

Re: STEP file read might be crazy long ...

Post by vejmarie »

easyw-fc wrote:
vejmarie wrote: My latest patch has been integrated upstream. So you can recompile the stuff, and we shall have an opening time pretty descent now.
Hi,
I'm testing again with FC 0.17.9933 64b standard build (without TBB vejmarie patch) but with the update timer to the progress bar
in win10-64b
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.9933 (Git)
Build type: Release
Branch: master
Hash: 6c3b78e97bbb8653e1189038c99682becef71626
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
loading time = 919.57400012s
displaying time = 503.263000011s
so loading time has been improved, also without MT patch, but displaying time has dropped down drastically from...
OLD test had:
FC 9802 64b
loading time = 1236.62700009s
displaying time = 92.0999999046s

Has been changed something in the loading mode?
I also have a lot of errors during loading time that were not present on FC 9802 64b
loading...
Cannot compute Inventor representation for the shape of Part__Feature148.
Cannot compute Inventor representation for the shape of Part__Feature391.

loading time = 919.57400012s
displaying time = 503.263000011s
Maurice
I am currently checking the Inventor issue, which I do have also even if the model is properly displayed. Your display time are very long this is strange. What I did observed is that the TBB fix is working far more efficiently currently with the progress bar fix and that you should get something in the 500-600s with it enabled on your system or even faster. I do not understand your display time. On mine they are consistent and around 70s with the same script you did posted. I will continue to have a look to it tonight. Might be great to test with the TBB fix ;).

Roughly I have the same level of performances on my machine with progress bar fix + TBB inside OCCT than with CAD Assistant. But there is a major difference is that CAD Assistant is reading the file sequentially. There is also another strange thing to me, which is the inventor representation which is computed during the read phase and not the displaying one. I am also wondering if we couldn't compute the inventor representation into a thread while the reading process continue, which could accelerate things.
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: STEP file read might be crazy long ...

Post by easyw-fc »

vejmarie wrote:I do not understand your display time. On mine they are consistent and around 70s with the same script you did posted. I will continue to have a look to it tonight.
Would you please test the loading script with the pre built dmg FC release, to see if the displaying time is similar to mine?
https://github.com/FreeCAD/FreeCAD/rele ... x86_64.dmg
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: STEP file read might be crazy long ...

Post by sgrogan »

https://github.com/sgrogan/FreeCAD/rele ... uildx64.7z
HEAD of vejmarie's FreeCAD/step fork, linked against vejamarie's OCCT/parallel-step fork w/TBB. Added HAVE_TBB to FreeCAD's Cmake.
"fight the good fight"
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: STEP file read might be crazy long ...

Post by easyw-fc »

sgrogan wrote:https://github.com/sgrogan/FreeCAD/rele ... uildx64.7z
HEAD of vejmarie's FreeCAD/step fork, linked against vejamarie's OCCT/parallel-step fork w/TBB. Added HAVE_TBB to FreeCAD's Cmake.
thx a lot for building it! :D
here some results with my test:
main branch 0.17.9944
loading...
Cannot compute Inventor representation for the shape of Part__Feature148.
.....
Cannot compute Inventor representation for the shape of Part__Feature890.
loading time = 887.912000179s
displaying time = 10.2559998035s
still unresponsive for a lot...
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.9944 (Git)
Build type: Release
Branch: master
Hash: 9b58d8bd6fe19b0b921ffa0b5712186a0b3be09d
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
vejmarie STEP branch 0.17.9927
loading...
Cannot compute Inventor representation for the shape of Part__Feature148.
...
Cannot compute Inventor representation for the shape of Part__Feature890.
loading time = 927.269000053s
displaying time = 457.409999847s
vejmarie build
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.9927 (Git)
Build type: Release
Branch: step
Hash: 7b5707b1c6fe541717a7427c5fc19e29da920da1
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
anyway the new 9944 build is not so far from CAD Assistance performance in loading+displaying time (about 3 times, it was much worse)
CAD Assistant
loading 37.426s
prepared in 196.581
presentation in 81.9969s
tot. 316s
still there is much to improve, as vejmarie said, in loading and manipulating objects
vejmarie wrote:this is a demo stuff from Open Cascade it should rely on there own code. Let me discuss a little bit with them on that.
that would be also useful may be in importing and exporting assembly tree structure implementation
User avatar
vejmarie
Posts: 713
Joined: Mon Jan 04, 2016 4:52 pm
Location: Somewhere between France, USA and Taiwan
Contact:

Re: STEP file read might be crazy long ...

Post by vejmarie »

easyw-fc wrote:
sgrogan wrote:https://github.com/sgrogan/FreeCAD/rele ... uildx64.7z
HEAD of vejmarie's FreeCAD/step fork, linked against vejamarie's OCCT/parallel-step fork w/TBB. Added HAVE_TBB to FreeCAD's Cmake.
thx a lot for building it! :D
here some results with my test:
main branch 0.17.9944
loading...
Cannot compute Inventor representation for the shape of Part__Feature148.
.....
Cannot compute Inventor representation for the shape of Part__Feature890.
loading time = 887.912000179s
displaying time = 10.2559998035s
still unresponsive for a lot...
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.9944 (Git)
Build type: Release
Branch: master
Hash: 9b58d8bd6fe19b0b921ffa0b5712186a0b3be09d
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
vejmarie STEP branch 0.17.9927
loading...
Cannot compute Inventor representation for the shape of Part__Feature148.
...
Cannot compute Inventor representation for the shape of Part__Feature890.
loading time = 927.269000053s
displaying time = 457.409999847s
vejmarie build
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.9927 (Git)
Build type: Release
Branch: step
Hash: 7b5707b1c6fe541717a7427c5fc19e29da920da1
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
anyway the new 9944 build is not so far from CAD Assistance performance in loading+displaying time (about 3 times, it was much worse)
CAD Assistant
loading 37.426s
prepared in 196.581
presentation in 81.9969s
tot. 316s
still there is much to improve, as vejmarie said, in loading and manipulating objects
vejmarie wrote:this is a demo stuff from Open Cascade it should rely on there own code. Let me discuss a little bit with them on that.
that would be also useful may be in importing and exporting assembly tree structure implementation
Your timing i still very disturbing to me. My system is a Macbook Pro Core i5 2.7Ghz .. Not the fastest stuff (this is a laptop), and I am reading this file in 360s everything included with latest build compares to 340s with CAD Assitant on the same machine. I do have an SSD, but this has impact only on the loading phase. Can you try the same test within a VM running linux on the same hardware ? I am trying to figure out if we are missing some compilation switch on windows, because you are far from what I get :(
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: STEP file read might be crazy long ...

Post by easyw-fc »

vejmarie wrote: My system is a Macbook Pro Core i5 2.7Ghz .. Not the fastest stuff (this is a laptop), and I am reading this file in 360s everything included with latest build compares to 340s with CAD Assistant on the same machine. I do have an SSD, but this has impact only on the loading phase.
I do have a SSD disk too ...
vejmarie wrote: Can you try the same test within a VM running linux on the same hardware ? I am trying to figure out if we are missing some compilation switch on windows, because you are far from what I get :(
I surely will...
I had the same impression...
An other test would be to see if the official build dmg for OSX in your system is getting same performance of your internal build...
https://github.com/FreeCAD/FreeCAD/releases
Unfortunately atm I cannot test myself because I have a MacMini but with Lion (still not upgraded)

I will update with latest test :)
Maurice
Post Reply