Sketcher slow on delete object

About the development of the Part Design module/workbench. PLEASE DO NOT POST HELP REQUESTS HERE!
abdullah
Posts: 3174
Joined: Sun May 04, 2014 3:16 pm

Re: Sketcher slow on delete object

Postby abdullah » Sun Dec 31, 2017 3:04 pm

triplus wrote:
Sat Dec 30, 2017 6:40 pm
I have it identified. I am not sure how to solve this, but it is worth reporting it in the bug tracker. I think it should be possible to delete an element without a recompute, just with a solve.



Just thinking out loud. Any chance you could re-use this new addition in FreeCAD 0.17? If "Auto update" is enabled in sketcher edit mode to in addition use Skip recomputes feature?
I am not sure if by re-use you mean implement. I will take a look at it. In the code I left a note for myself (viewprovidersketch.cpp):

Code: Select all

       // Notes on solving and recomputing:
        //
        // This function is generally called from StdCmdDelete::activated
        // Since 2015-05-03 that function includes a recompute at the end.
This is, before that date, the power to choose whether recompute or solve was fully on the sketcher module. Then, the recompute made its way into the Gui namespace, so general Freecad, not a specific module. This means that "removing" or "overloading" it has to take into account much more code. I will take a look. :D
triplus
Posts: 8364
Joined: Mon Dec 12, 2011 4:45 pm

Re: Sketcher slow on delete object

Postby triplus » Mon Jan 01, 2018 2:29 pm

abdullah wrote:
Sun Dec 31, 2017 3:04 pm
I am not sure if by re-use you mean implement.
I was thinking more in the direction of re-use:

Code: Select all

Gui.ActiveDocument.Document.RecomputesFrozen = True
That is when entering Sketcher edit mode to set this if Auto update option is set to Off. And when leaving the sketcher edit mode to set it to False (or leave it enabled if it was already enabled before entering the Sketcher edit mode).
abdullah
Posts: 3174
Joined: Sun May 04, 2014 3:16 pm

Re: Sketcher slow on delete object

Postby abdullah » Mon Jan 01, 2018 5:22 pm

triplus wrote:
Mon Jan 01, 2018 2:29 pm
abdullah wrote:
Sun Dec 31, 2017 3:04 pm
I am not sure if by re-use you mean implement.
I was thinking more in the direction of re-use:

Code: Select all

Gui.ActiveDocument.Document.RecomputesFrozen = True
That is when entering Sketcher edit mode to set this if Auto update option is set to Off. And when leaving the sketcher edit mode to set it to False (or leave it enabled if it was already enabled before entering the Sketcher edit mode).
Ah cool! I did not know that existed.

I am not sure how this and the sketcher should evolve together (let's say in 0.18). I think we should define that first.

If we have now a tool to inhibit recomputes that are executed, maybe what we should do is putting this inhibition in a toggle button in the permanent FC bar and then remove the auto-update checkbox from the solver dialog of the solver. So the "checkbox" functionality is taken over by the toggle button. The "update" button in the solver dialog would then be adapted to: remove the inhibition, recompute and restore the inhibition (if it there was an inhibition in the first place).

I mean, I see no point in having both mechanisms working in parallel in 0.18.

Codewise, it might be feasible to just add the toggle button for 0.17.

I would rather not code something like "a patch" that will nevertheless need to be fully reworked in 0.18. In any case, it looks like more work to make the work-around than to code the actual deal...

Please come back to me with feedback on how this should work in the long run. :)
triplus
Posts: 8364
Joined: Mon Dec 12, 2011 4:45 pm

Re: Sketcher slow on delete object

Postby triplus » Wed Jan 03, 2018 3:59 pm

Not knowing the details and possible implications i guess in general a toggle command would work for me.
Dex
Posts: 56
Joined: Tue Sep 26, 2017 4:52 pm

Re: Sketcher slow on delete object

Postby Dex » Thu Jan 04, 2018 7:31 am

Just a thought: Maybe it would be possible to reorganize the recompute also after operation approval (pad, hole, pocket, loft etc.) - For example when I want to make a polar pattern than it becomes very slow (like >5 minutes) on every occurences increment (depend on geometry of course). Eventually when the computation is finished, I click OK to close "polar pattern" and FreeCad seems to calculate all operation from the beginning for another >5 minutes. It could just accept the last computed geometry.
poontitming
Posts: 4
Joined: Wed Nov 28, 2018 3:57 pm
Location: Hong Kong / Minneapolis

Re: Sketcher slow on delete object

Postby poontitming » Sat Apr 13, 2019 8:14 pm

Hi,

The skip recomputes function is very useful. Unfortunately it's hidden deeply. I tried google and looked into the menus couldn't find it until I read the discussions in this topic. It saves hours to recompute each time when I delete things from sketch. Please consider put it as a menu like Excel calculation option, in the perference, or elsewhere easier to find. Thank you very much for all your contributions.
chrisb
Posts: 16349
Joined: Tue Mar 17, 2015 9:14 am

Re: Sketcher slow on delete object

Postby chrisb » Sat Apr 13, 2019 9:25 pm

You probably use an old version, it's fixed. Please update to current stable version 0.18.