| Summary: | Split layer can take hours on images with many colors | ||
|---|---|---|---|
| Product: | [Applications] krita | Reporter: | Dmitry Kazakov <dimula73> |
| Component: | General | Assignee: | Krita Bugs <krita-bugs-null> |
| Status: | CONFIRMED --- | ||
| Severity: | normal | CC: | ahab.greybeard, halla, joseph, saurabhk660, tamtamy.tymona |
| Priority: | NOR | Keywords: | efficiency-and-performance |
| Version First Reported In: | 4.2.9 | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Microsoft Windows | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: |
simple and small range of colours
small size, small range of colours |
||
|
Description
Dmitry Kazakov
2020-03-31 21:52:53 UTC
I get this with 4.2.9 but not 4.2.8. using appimages. Progress is slow and stops at 91% complete, with one core at 100% (a 2 x 4-core system). Setting to Confirmed Hm, I tested with the 4.3 branch and didn't get a deadlock :-( @Dmitry, Ahab - can you please provide a file that it hangs on? And maybe even a backtrace? Neither boud or confifu can reproduce it. Created attachment 127201 [details]
simple and small range of colours
I attach split-test-simple.kra and split-test-complex.kra which are 3000 x 2000 pixels. I also attach small-split-test-simple.kra which is 300 x 200 pixels.
With 4.2.9 and with the Apr-01 4.3.0 prealpha git 62b9516 appimages, the large ones lock up with 1 core at 100%.
With split-test-simple, the progress goes up rapidly and exponentially to 85% complete before locking up.
With split-test-complex, the progress goes up in a similar way to 8% complete before locking up.
With small-split-test-simple then 4.2.9 and the 4.3.0 prealpha both quickly split it into a very large number of colour layers.
4.2.8 splits it into only two layers, both called 'Salmon'. This is probably because 4.2.8 has different default settings.
Created attachment 127202 [details]
small size, small range of colours
split-test-complex.kra is 6.3 MB and you can download it from here: https://www.dropbox.com/s/27w6zj2w7t42i09/split-test-complex.kra?dl=1 Default options have changed for 4.2.9. I got the same behavior with 4.2.8 and 4.2.9 when I changed the options to be the same. For 4.2.8, default options are from top to bottom are (T,F,T,F,T,T,fuzziness = 20). For 4.2.9, default options are (T,F,T,T,T,F, fuzziness = 0). I think this is because, we replaced KisConfig with KisDialogStateSaver in dlg_layersplit.cpp commit f6e7a99de04ebe023af444fc9e1c67d93f8f3a5a. We didn't use any default values in the case of KisDialogStateSaver. WIth fuzziness = 0, it creates about 37000 layers... It's not hanging, it's simply going overboard! The algorithm to figure out which layer a certain pixel should go into then iterates over all the layers, so for every pixel, we check all created layers in a tight loop. The default values for layer split options are fixed now: https://invent.kde.org/graphics/krita/-/commit/3584a78e6c461d67d466 But the problem of making way too many layers without informing the user beforehand is still there. |