Is there a way to speed up "Detail view"

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
freedman
Veteran
Posts: 3441
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Is there a way to speed up "Detail view"

Post by freedman »

It takes about a half hour to set up a Detail view. Every time I move the focus a recompute kicks off. My recomputes seem to be taking a lot longer as I add pages. I tried turning off auto update but then I can't see what I want but I presume when I finish a page, turn off update. Any pointers on making this go faster, ways to deal with the future when I have 10 pages.

Thank you
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Is there a way to speed up "Detail view"

Post by wandererfan »

freedman wrote: Fri Feb 15, 2019 9:38 pm It takes about a half hour to set up a Detail view. Every time I move the focus a recompute kicks off. My recomputes seem to be taking a lot longer as I add pages. I tried turning off auto update but then I can't see what I want but I presume when I finish a page, turn off update. Any pointers on making this go faster, ways to deal with the future when I have 10 pages.
I've never noticed Detail to be particularly slow vs other types of View. If you can, please post you file and I'll have a look.

TD is slow for some shapes. Usually it is the Hidden Line Removal algos in OCC. OCC announced at one point that they were working on implementing parallel processing for HLR, but I haven't heard of any progress since. That would help a lot.

We could really use something like a painter's algorithm for rendering, but AFAIK it doesn't exist in OCC.
freedman
Veteran
Posts: 3441
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: Is there a way to speed up "Detail view"

Post by freedman »

Here is the threaded part.

Create view, from button press to view; 55 sec.
Create detail, from button press to view; 32 sec.
Move anchor from 0 to .1, from button press to view; 40 sec.

File open with page; 55 sec.
File open without page; 2 sec.
Attachments
new_created_thread.FCStd
(756.25 KiB) Downloaded 46 times
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Is there a way to speed up "Detail view"

Post by wandererfan »

freedman wrote: Sun Feb 17, 2019 10:49 pm Here is the threaded part.

Create view, from button press to view; 55 sec.
Create detail, from button press to view; 32 sec.
Move anchor from 0 to .1, from button press to view; 40 sec.

File open with page; 55 sec.
File open without page; 2 sec.
It isn't the Detail view that is slowing things down;
original file - 43.8 sec to load
Log: TIMING - Detail GO spent: 513.222 millisecs in HLRBRep_Algo & co
Log: TIMING - Detail GO spent: 6.280 millisecs in hlrToShape and BuildCurves
Log: TIMING - Detail DVP spent: 11.487 millisecs in GO::extractGeometry
Log: TIMING - ProjItem GO spent: 17155.471 millisecs in HLRBRep_Algo & co
Log: TIMING - ProjItem GO spent: 7.116 millisecs in hlrToShape and BuildCurves
Log: TIMING - ProjItem DVP spent: 27.349 millisecs in GO::extractGeometry

no detail - 38.4 to load
Log: TIMING - ProjItem GO spent: 17860.170 millisecs in HLRBRep_Algo & co
Log: TIMING - ProjItem GO spent: 9.524 millisecs in hlrToShape and BuildCurves
Log: TIMING - ProjItem DVP spent: 28.903 millisecs in GO::extractGeometry

The HLR routines are taking approx 17-18 second to process "ProjItem" (Front) and it gets computed twice.

If I use a regular View instead of a ProjectionGroup, View is only executed once, so the load is faster.
no detail, using View - 22 to load
Log: TIMING - View GO spent: 18054.734 millisecs in HLRBRep_Algo & co
Log: TIMING - View GO spent: 9.812 millisecs in hlrToShape and BuildCurves
Log: TIMING - View DVP spent: 30.207 millisecs in GO::extractGeometry

So the lesson 1 here seems to be don't use ProjectionGroup when a regular View will do.
Lesson 2 is that we need a new geometry builder for cases where we aren't interested in hidden lines.

freecad-daily
OS: Linux Mint 19
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15860 (Git)
Build type: Release
Branch: master
Hash: 3b708c7f84b0425076b520e1d95627b20fd75fe0
Python version: 2.7.15rc1
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Canada (en_CA)
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Is there a way to speed up "Detail view"

Post by wandererfan »

freedman wrote: Sun Feb 17, 2019 10:49 pm Create view, from button press to view; 55 sec.
Create detail, from button press to view; 32 sec.
Move anchor from 0 to .1, from button press to view; 40 sec.

File open with page; 55 sec.
File open without page; 2 sec.
Could you repeat your timing test with the current version, please? It seems somewhat faster here. Want to make sure it's not just wishful thinking.

Thanks.
freedman
Veteran
Posts: 3441
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: Is there a way to speed up "Detail view"

Post by freedman »

Not sure about what file I used so I downloaded the file from the post above for the speed test. I have V18.15991 and v18.16085 installed.


V18.15991 .......... v18.16085
Open file:.....55 sec..........53 sec.
delete detail.
Add detail:.....32 sec...........5 sec.
Move detal anchor:.....33 sec...........4 sec.
delete proj. and detail
Create proj:.....54 sec...........26 sec

Big improvements on:
add detail, 32 sec to 5 sec.
Move detail anchor 33sec. to 4 sec., this is great!
Create projection 54 sec. to 26 sec


Nice!
I'll start using that tomorrow morning. It's hard to make a chart in a post, Spaces and Tabs don't hold.
Thanks
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Is there a way to speed up "Detail view"

Post by Jee-Bee »

freedman wrote: Tue Mar 12, 2019 7:04 am I'll start using that tomorrow morning. It's hard to make a chart in a post, Spaces and Tabs don't hold.
Thanks
use code blocks ;)

Code: Select all

                    V18.1599    v18.16085
Open file:          55 sec.     53 sec.
delete detail.
Add detail:         32 sec.     5 sec.
Move detail anchor: 33 sec.     4 sec. 
delete proj. and detail
Create proj:        54 sec.     26 sec
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Is there a way to speed up "Detail view"

Post by wandererfan »

freedman wrote: Tue Mar 12, 2019 7:04 am Big improvements on:
add detail, 32 sec to 5 sec.
Move detail anchor 33sec. to 4 sec., this is great!
Create projection 54 sec. to 26 sec
Awesome. Glad it wasn't just wishful thinking.
chrisb
Veteran
Posts: 53933
Joined: Tue Mar 17, 2015 9:14 am

Re: Is there a way to speed up "Detail view"

Post by chrisb »

Wow! And Thank you!
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply