Is 30 second compute times normal for more complex models?

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Is 30 second compute times normal for more complex models?

Post by triplus »

Will2 wrote: Tue Aug 14, 2018 10:40 pm Currently I have a PartDesign model with 20ish additive/subtractive features and it often take 30 seconds or more to compute when I make a feature change.
Hi @Will2

This is highly use case dependent. Without the file it's hard to say if anything could be improved for your use case or not. Likely some CPU heavy operations are involved and therefore the answer i guess could very well be yes this is normal.
I've worked around it by having a couple instances of FreeCAD running so when on is computing I can work on another model.
Right clicking on the document item in the tree view. There are some options to control the recompute routine. Maybe you will be able to incorporate that into your design procedure. To for example change more parameters and after do a recompute. Effectively reducing the time needed to get the job done.
Will2
Posts: 33
Joined: Thu Apr 28, 2016 3:19 pm

Re: Is 30 second compute times normal for more complex models?

Post by Will2 »

triplus wrote: Wed Aug 15, 2018 3:26 pm Right clicking on the document item in the tree view. There are some options to control the recompute routine. Maybe you will be able to incorporate that into your design procedure. To for example change more parameters and after do a recompute. Effectively reducing the time needed to get the job done.
This will probably turn out to be super useful. I didn't get back to you right away because I didn't quite understand its behaviour. What was confusing was that it resets every time a recompute is done. It also allows new features to be applied with an 8 second compute time which is waaaaaay better. However I've had cases where (I think) it has caused the model to be flipped about an axis leaving it askew. Could be a bug but I have only seen something happen like this once before and happened twice with this.

Strangely enough, I think the file that used to take me 40 seconds to recompute, seems to now be 25 seconds max to recompute.

TLDR thanks for the tip, it worked awesome!
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Is 30 second compute times normal for more complex models?

Post by triplus »

Will2 wrote: Fri Aug 17, 2018 11:36 pm TLDR thanks for the tip, it worked awesome!
You're welcome.
freecad-heini-1
Veteran
Posts: 7788
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Is 30 second compute times normal for more complex models?

Post by freecad-heini-1 »

wmayer wrote: Wed Aug 15, 2018 6:00 am [*]It depends on how the binaries are built. If the optimization level flag of the compiler is not used then the binaries are slower at execution time.
If it's not too much work you could try to build your own version where in the CMake GUI panel you explicitly set Release as build type.
[/list]
Very interesting. I will try this in near future if someone can help me to compile Freecad for my machine.
@Werner, please could I ask you in German for your support?

On Wednesday I had a complex plastic injection mold to design and to optimize. In general I prefer to work with top-down design technique based on sketches and faces from sketches. All further references are referenced on this faces and edges. After I finsihed my work in the late afternoon, I received an email from my customer with a change. In my design it concerns the first 20 features. I changed it, and crossed my fingers for recompute. It took about two minutes with some boolean operations,, split / slice, Lattice2 explode compound, followed with booleans and fillets. The result amazed me very much. No error, everything was fine. It remembers me on my positive experiences with Pro-Engineer. Very nice to see how good Freecad is. If you work in a clean and clever way, naming the features, thinking about references and so on, Freecad will work like a charme. For me Freecad play in the same high level as Pro-Engineer 10 years ago. I like that it run on Xubuntu Linux.
Freecad is different, and I figured out a different workflow compared to Pro-Engineer, but I like it. From my feeling I'm faster with Freecad and my new workflow is more easy.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Is 30 second compute times normal for more complex models?

Post by NormandC »

wmayer wrote: Wed Aug 15, 2018 6:00 am It depends on how the binaries are built. If the optimization level flag of the compiler is not used then the binaries are slower at execution time. Will2 you said that Build type is None while Release should be normal. So, it might be possible that optimization level is low or even off.
If it's not too much work you could try to build your own version where in the CMake GUI panel you explicitly set Release as build type.
sgrogan wrote: Wed Aug 15, 2018 11:40 am I'm pretty sure Will2 is using the stable PPA
I can't speak for Will2, but I confirm that the stable PPA (and the daily as well) does not have a Build type set.

OS: Ubuntu 18.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13528 (Git)
Build type: None
Branch: releases/FreeCAD-0-17
Hash: 5c3f7bf8ec51e2c7187789f7edba71a7aa82a88b
Python version: 2.7.15rc1
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/Canada (fr_CA)

sgrogan wrote: Wed Aug 15, 2018 11:40 am And the rules file https://git.launchpad.net/~freecad-main ... ?h=release
Notice that the "master" branch does have an additional switch that is not in the release and dailybuild-occ branches:

Code: Select all

-DCMAKE_BUILD_TYPE="Release" \
https://git.launchpad.net/~freecad-main ... s?h=master

BTW the releases/FreeCAD-0-17 branch is now up to 0.17.13541. While most of the new commits are to solve macOS build issues, there is one bug fix for the PartDesign Hole feature, so it would be relevant to publish a new stable PPA update.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Is 30 second compute times normal for more complex models?

Post by NormandC »

sgrogan, I saw you triggered a new build for the stable PPA, but you did not add the Build type switch to the rules file. :(
mumf83
Posts: 42
Joined: Thu Jul 12, 2018 8:14 pm

Re: Is 30 second compute times normal for more complex models?

Post by mumf83 »

triplus wrote: Wed Aug 15, 2018 3:26 pm Right clicking on the document item in the tree view. There are some options to control the recompute routine. Maybe you will be able to incorporate that into your design procedure. To for example change more parameters and after do a recompute. Effectively reducing the time needed to get the job done.
I'm having the same issue when recomputing. I have a nested sketch (I'm not sure if this is deeply nested as I'm still new to Freecad) and with every change it takes ~5 seconds to finish and this can be frustrating when making small changes. Can you you explain what needs to be done from the document item when right clicking and where we need to click, etc. Thank you. Below is a screen shot of my tree and the highlighted sketch is what I'm trying to modify.
tree.png
tree.png (75.89 KiB) Viewed 883 times
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Is 30 second compute times normal for more complex models?

Post by triplus »

Hi @mumf83

While inside the Sketcher edit mode make sure the option Auto Update is unchecked in the sidebar. That should work in a way when you change something in Sketcher all dependent objects don't get recomputed. While outside the Sketcher edit mode. It isn't seen on your screenshot. But the top most item will be the current document item (usually named Unnamed when creating a new document). Right clicking on it there will be an option you can enable to Skip recomputes.
mumf83
Posts: 42
Joined: Thu Jul 12, 2018 8:14 pm

Re: Is 30 second compute times normal for more complex models?

Post by mumf83 »

triplus wrote: Wed Aug 22, 2018 1:35 pm Hi @mumf83

While inside the Sketcher edit mode make sure the option Auto Update is unchecked in the sidebar. That should work in a way when you change something in Sketcher all dependent objects don't get recomputed. While outside the Sketcher edit mode. It isn't seen on your screenshot. But the top most item will be the current document item (usually named Unnamed when creating a new document). Right clicking on it there will be an option you can enable to Skip recomputes.
Perfect. Thank you. If I mark the current document to skip recomputes how would I force a recompute? Do I just simply untick the option again? I'm not sure what "Mark to recompute" does as its not doing anything when I click it.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Is 30 second compute times normal for more complex models?

Post by triplus »

mumf83 wrote: Wed Aug 22, 2018 1:43 pm Perfect. Thank you.
You're welcome.
If I mark the current document to skip recomputes how would I force a recompute? Do I just simply untick the option again? I'm not sure what "Mark to recompute" does as its not doing anything when I click it.
Look on the File toolbar as there is a recompute button on it. It will get enabled after such action ("Mark to recompute" or you changing some parameter and some feature to be marked automatically). You can press on it to do a recompute.
Post Reply