Getting rid of unnecessary recomputes
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Getting rid of unnecessary recomputes
No, at least not so easily. And besides that the code would be each time different anyway for the appropriate slot function (connected to the toggled signal). There you have to block the signals of the other controls which are different for each dialog.
Re: Getting rid of unnecessary recomputes
in git ee37672 you'll a reference implementation how the update checkbox can be realized.
-
- Posts: 554
- Joined: Sat Apr 07, 2012 2:42 am
Re: Getting rid of unnecessary recomputes
What about implementing a check in PropertyXYZ::setValue(_somevalue_) that only changes the property if _somevalue_ is different from the current value? In that way we would also save recomputes in other cases, e.g. the user starts to edit the value but doesn't change it
Re: Getting rid of unnecessary recomputes
Some years ago I tried this idea too but it led to a lot of trouble and inconsistencies so that I didn't follow further this approach.
-
- Posts: 554
- Joined: Sat Apr 07, 2012 2:42 am
Re: Getting rid of unnecessary recomputes
OK, next idea: Implement a "lock" for the feature (at the PropertyContainer level?) which simple doesn't set the "touched" StatusBit no matter how many Properties are changed, until the lock is releasedSome years ago I tried this idea too but it led to a lot of trouble and inconsistencies so that I didn't follow further this approach.
Re: Getting rid of unnecessary recomputes
I once wanted to have this too but couldn't convince Jürgen. He said it's too dangerous that if a developer of a 3rd party module isn't carefully enough (i.e. to unlock it again) the recomputation of the document might be partially broken.OK, next idea: Implement a "lock" for the feature (at the PropertyContainer level?) which simple doesn't set the "touched" StatusBit no matter how many Properties are changed, until the lock is released
Re: Getting rid of unnecessary recomputes
I recently created a floor plan using the sketcher. At the time i had about 200 Constraints and 20 remaining DOFs the recompute took rediciously long (about 30 seconds) even though the the time was not spend solving the sketch.
Could such a lock help in such a situation?
Could such a lock help in such a situation?