Bug 343685 - Layer Properties dialogue gets very slow with large documents
Summary: Layer Properties dialogue gets very slow with large documents
Alias: None
Product: krita
Classification: Applications
Component: Layer Stack (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
Depends on:
Reported: 2015-02-02 09:17 UTC by Tyson Tan
Modified: 2015-02-03 01:09 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description Tyson Tan 2015-02-02 09:17:18 UTC
Layer Properties dialogue from Layers Docker >> Properties slows down when dealing with large documents. Use A3 600dpi (7016x9920) on a i7 3520M laptop would result in very laggy response time over any change in the dialogue. Even closing the dialogue cannot be done immediately. However, when a layer is empty, it doesn't suffer such slowdown.

The slow responsiveness also impacts Layers Docker itself when I click OK to close the dialogue. If I use Layer Properties dialogue to change the layer's Name into ABCDEF, I would see the letters popping up one by one in the Docker.

Reproducible: Always

Steps to Reproduce:
1. Create a large new document, like A3 600dpi or even larger;
2. On Layer 1 or a new layer filled with any color;
3. Layers Docker >> Properties or F2;
4. Try typing something in the Name field or just doing anything in that dialogue.

Actual Results:  
Layers Properties slows down. When clicking OK to close the dialogue with Layer name changed, letters does not show up immediately in Layers Docker. Instead they pop up one by one in a slow manner.

Expected Results:  
Layers Properties does not slow down.
Comment 1 Halla Rempt 2015-02-02 09:21:45 UTC
Yes, I can confirm this -- no idea what the cause for the slowdown is, though.
Comment 2 Halla Rempt 2015-02-02 09:23:56 UTC
Oh... It's the preview check, of course. If you've got a big layer, it'll cause a refresh of the image stack with every change in the dialog, even the name (where it's silly).
Comment 3 Halla Rempt 2015-02-02 09:26:34 UTC
Not to mention a timer that tries to update the preview every 200ms...
Comment 4 Halla Rempt 2015-02-02 18:36:24 UTC
Git commit 2cfd6a0b9ba12a7cee821cd61948451aa4931f33 by Boudewijn Rempt.
Committed on 02/02/2015 at 18:35.
Pushed by rempt into branch 'calligra/2.9'.
Related: bug 200

M  +91   -77   krita/ui/dialogs/kis_dlg_layer_properties.cc
M  +6    -10   krita/ui/dialogs/kis_dlg_layer_properties.h
M  +3    -0    krita/ui/forms/wdglayerproperties.ui
M  +1    -0    krita/ui/widgets/kis_channelflags_widget.cpp
M  +6    -0    krita/ui/widgets/kis_channelflags_widget.h

Comment 5 Tyson Tan 2015-02-03 01:09:11 UTC
The re-naming is now more responsive. Thank you! However, the highlight in Composite mode drop-menu becomes slow after changing the opacity. 

The slow down seemed to triggered by the following steps:
1. When the layer is huge and filled;
2. Layers Docker >> Properties...;
3. Opacity >> 50%
4. Composite mode >> Move over the drop-menu

Once happened, it does not return to normal speed even when the Opacity was changed back to 100%. Re-opening the Layer Properties dialogue removes the slow down until I trigger it again.

It does not slow down when doing:
Composite mode change >> Opacity Change >> Composite mode change.