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.
User avatar
easyw-fc
Posts: 2796
Joined: Thu Jul 09, 2015 9:34 am

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

Postby easyw-fc » Fri Jan 27, 2017 8:17 pm

sgrogan wrote: I realized I must compile vejmaries OCC7 branch then his FreeCAD branch against this. I haven't given up.
Hi @sgrogan
I received an update from @vejmarie ... his recent PR has been committed here
https://github.com/FreeCAD/FreeCAD/pull/466
The code has been included into commit #9810.
Any version of FreeCAD with a higher value than that will run the new STEP reader which has the ability to have TBB usage dependent of its activation status at CMake Level ...

So, if I have correctly interpreted the @vejmarie advise, it should be easier to build the main branch with the new OCCT (with TBB support)...

Thx
Maurice
User avatar
sgrogan
Posts: 5632
Joined: Wed Oct 22, 2014 5:02 pm

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

Postby sgrogan » Sat Jan 28, 2017 5:05 am

easyw-fc wrote:So, if I have correctly interpreted the @vejmarie advise, it should be easier to build the main branch with the new OCCT (with TBB support)...
I will compile current FreeCAD master against stock OCCT7 w/TBB, but I think we need vejmarie's patched OCCT branch w/TBB to get the full power.
viewtopic.php?f=10&t=16952&start=40#p154514
triplus
Posts: 9277
Joined: Mon Dec 12, 2011 4:45 pm

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

Postby triplus » Sat Jan 28, 2017 9:38 am

Note that in the past you had to use OCC with TBB to get some parallelism. I remember when i had to compile OCC with TBB to observe some meshing related parallelism as BOA parallelism wasn't made available yet for FreeCAD. Now i checked when this changed and it changed in OCC 6.9.0:
Support of parallelism without TBB library
Therefore in theory starting from OCC 6.9.0/OCE 0.18 you don't need TBB library to observe parallelism of different algorithms. But at some point in the future some tests should be made to see if there is performance difference when TBB is enabled and when not. And for OCE 0.18 it can be tested how does the OpenMP option behave.

P.S. Therefore i do imagine if your work @vejmarie will be upstreamed they could require to provide option for scenario without TBB library used. But that is just a speculation.
User avatar
vejmarie
Posts: 576
Joined: Mon Jan 04, 2016 4:52 pm
Location: Somewhere between France, USA and Taiwan
Contact:

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

Postby vejmarie » Sun Jan 29, 2017 9:17 am

sgrogan wrote:
easyw-fc wrote:So, if I have correctly interpreted the @vejmarie advise, it should be easier to build the main branch with the new OCCT (with TBB support)...
I will compile current FreeCAD master against stock OCCT7 w/TBB, but I think we need vejmarie's patched OCCT branch w/TBB to get the full power.
viewtopic.php?f=10&t=16952&start=40#p154514
Yes. You can download the branch from my github repot vejmarie/occt7/parallel_step and it shall do the work. I am discussing with OpenCascade team to see if it could goes upstream. This branch is based on OCCT 7.0.0
User avatar
Kunda1
Posts: 7010
Joined: Thu Jan 05, 2017 9:03 pm

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

Postby Kunda1 » Sun Jan 29, 2017 2:44 pm

vejmarie wrote:
sgrogan wrote:
easyw-fc wrote:So, if I have correctly interpreted the @vejmarie advise, it should be easier to build the main branch with the new OCCT (with TBB support)...
I will compile current FreeCAD master against stock OCCT7 w/TBB, but I think we need vejmarie's patched OCCT branch w/TBB to get the full power.
viewtopic.php?f=10&t=16952&start=40#p154514
Yes. You can download the branch from my github repot vejmarie/occt7/parallel_step and it shall do the work. I am discussing with OpenCascade team to see if it could goes upstream. This branch is based on OCCT 7.0.0
@vejmarie can you link to an upstream ticket ?
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
Kunda1
Posts: 7010
Joined: Thu Jan 05, 2017 9:03 pm

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

Postby Kunda1 » Sun Jan 29, 2017 2:54 pm

Kunda1 wrote:
vejmarie wrote:
sgrogan wrote:
easyw-fc wrote:So, if I have correctly interpreted the @vejmarie advise, it should be easier to build the main branch with the new OCCT (with TBB support)...
I will compile current FreeCAD master against stock OCCT7 w/TBB, but I think we need vejmarie's patched OCCT branch w/TBB to get the full power.
viewtopic.php?f=10&t=16952&start=40#p154514
Yes. You can download the branch from my github repot vejmarie/occt7/parallel_step and it shall do the work. I am discussing with OpenCascade team to see if it could goes upstream. This branch is based on OCCT 7.0.0
@vejmarie can you link to an upstream ticket ?
@vejmarie the reason is because I'm tracking upstream OCC Bugs via https://forum.freecadweb.org/viewtopic.php?f=10&t=20264
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
vejmarie
Posts: 576
Joined: Mon Jan 04, 2016 4:52 pm
Location: Somewhere between France, USA and Taiwan
Contact:

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

Postby vejmarie » Sun Jan 29, 2017 3:51 pm

Kunda1 wrote:
Kunda1 wrote:
vejmarie wrote:
sgrogan wrote:
easyw-fc wrote:So, if I have correctly interpreted the @vejmarie advise, it should be easier to build the main branch with the new OCCT (with TBB support)...
I will compile current FreeCAD master against stock OCCT7 w/TBB, but I think we need vejmarie's patched OCCT branch w/TBB to get the full power.
viewtopic.php?f=10&t=16952&start=40#p154514
Yes. You can download the branch from my github repot vejmarie/occt7/parallel_step and it shall do the work. I am discussing with OpenCascade team to see if it could goes upstream. This branch is based on OCCT 7.0.0
@vejmarie can you link to an upstream ticket ?
@vejmarie the reason is because I'm tracking upstream OCC Bugs via https://forum.freecadweb.org/viewtopic.php?f=10&t=20264
Hi Kunda1, sorry I do not have opened an official ticket for my patch to be integrated. I am in fact in direct contact with the Open Cascade team and discuss it directly with them. I will asked them if they wish me to open a ticket which shall simplify your tracking. I will have a look to all open ticket and see if I can be of any help to make them closed.

vejmarie
User avatar
Kunda1
Posts: 7010
Joined: Thu Jan 05, 2017 9:03 pm

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

Postby Kunda1 » Sun Jan 29, 2017 6:44 pm

vejmarie wrote: Hi Kunda1, sorry I do not have opened an official ticket for my patch to be integrated. I am in fact in direct contact with the Open Cascade team and discuss it directly with them. I will asked them if they wish me to open a ticket which shall simplify your tracking. I will have a look to all open ticket and see if I can be of any help to make them closed.
Thanks man ;)
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
sgrogan
Posts: 5632
Joined: Wed Oct 22, 2014 5:02 pm

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

Postby sgrogan » Mon Jan 30, 2017 12:34 am

Win Test build and sample file: https://github.com/sgrogan/FreeCAD/releases/tag/STEP
First test show:
1)FC master/OCCT7 12 mins
2)FC master/OCCT7 w/ TBB, and adding HAVE_TBB to FC Cmake 12 mins
3)Vejmarie FC/step w/vejmarie OCCT7 w/TBB. and HAVE_TBB added to FC Cmake 7 mins.
For the 1) and 2) cases 2 threads are used at some times, not always.
For case 3) 2 threads are used almost for the full process, at max usage 3 threads are briefly used.
I have 8 threads available.
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
User avatar
easyw-fc
Posts: 2796
Joined: Thu Jul 09, 2015 9:34 am

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

Postby easyw-fc » Mon Jan 30, 2017 1:33 pm

sgrogan wrote:Win Test build and sample file: https://github.com/sgrogan/FreeCAD/releases/tag/STEP
thx a lot!
I will be able to test it this evening...
It would be nice to test it comparing also with CAD-Assistant for Windows of OCC
https://www.opencascade.com/content/cad-assistant
It is a CAD viewer also for STEP models and it is based on OCC and Qt, so a comparison may be interesting, to see if FC with MT is using all the power of OCC
vejmarie wrote: ...
- 2 - Selection of Compound which contains a huge number of elements which is crazy slow and make navigation painfull if these Compound are active.
...
vejmarie
CAD Assistance is available also for OSX, so it may worth to make a comparison with your new MT branch to CAD-Assistant
In Windows, after a very fast test, it seems to be much more responsive than FC in selecting and displaying elements
Thx as always
Maurice