prusa3d / PrusaSlicer

G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)
https://www.prusa3d.com/prusaslicer/
GNU Affero General Public License v3.0
7.75k stars 1.93k forks source link

temporarily disable background calculation over user interface #9138

Open M-K3y opened 2 years ago

M-K3y commented 2 years ago

Hello,

I almost exclusively use the background calculation for slicing, unfortunately it sometimes happens that with large or complex objects when creating supports or when aligning several individual parts, the background calculation takes quite a long time with each step, with a step that is repeated 10 times must or more, as currently the best solution is to disable this via Config => Settings => Background Calculation and then enable it again afterwards,

maybe a good optimization would be to create a small button, e.g. between the margin selection button and the cleaning volume settings, which can be used to turn the background calculation on and off directly from the user interface, or temporarily disable it until the next program start or manual slicing to generate gcode

foreachthing commented 2 years ago

maybe a good optimization would be to create a small button

Or, just a shortcut would be nice.

gudvinr commented 2 years ago

That's duplicate of #8672. Despite brush on support in the name, core issue is the same. Underlying problem seem to be coming from the fact that PS triggers processing after each change and it doesn't delay calculation while user still interacts with UI and.

Also there could be some issues related to bad thread prioritization and/or suboptimal code responsible for interactions between UI thread and background workers.
E.g. if there are too many background threads that actively doing some work, that'll ultimately lead to resource starvation.
Or, if background and UI thread often access same data (like mesh of the object or setting data), that could easily lead to stuttering because of often use of synchronization primitives, like mutexes, if implemented improperly.

Shortcut or button to manually turn that off is a mere workaround here. Which will help to avoid going to the menu but it's not an optimization nor real solution to the issue itself.