|
1 | 1 | /* |
2 | 2 | This file is part of darktable, |
3 | | - Copyright (C) 2021-2024 darktable developers. |
| 3 | + Copyright (C) 2021-2025 darktable developers. |
4 | 4 |
|
5 | 5 | darktable is free software: you can redistribute it and/or modify |
6 | 6 | it under the terms of the GNU General Public License as published by |
|
15 | 15 | You should have received a copy of the GNU General Public License |
16 | 16 | along with darktable. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 | */ |
18 | | -// our includes go first: |
| 18 | + |
19 | 19 | #include "bauhaus/bauhaus.h" |
20 | 20 | #include "common/dwt.h" |
21 | 21 | #include "develop/imageop.h" |
@@ -766,6 +766,14 @@ void gui_init(dt_iop_module_t *self) |
766 | 766 | g->radius = dt_bauhaus_slider_from_params(self, "radius"); |
767 | 767 | dt_bauhaus_slider_set_format(g->radius, " px"); |
768 | 768 |
|
| 769 | + // The current implementation's run time is proportional to the square of |
| 770 | + // the blur radius. Let's soft-limit it to protect users from unacceptably |
| 771 | + // long processing times for the full image (like when exporting), which |
| 772 | + // many users perceive as a hang. |
| 773 | + // NOTE: This is just quick damage control. The correct solution is to |
| 774 | + // replace the bad implementation with a more efficient one. |
| 775 | + dt_bauhaus_slider_set_soft_max(g->radius, 64); |
| 776 | + |
769 | 777 | g->type = dt_bauhaus_combobox_from_params(self, "type"); |
770 | 778 |
|
771 | 779 | g->blades = dt_bauhaus_slider_from_params(self, "blades"); |
|
0 commit comments