Bug 413088 - Changing visibility on multiple layers + calling refreshProjection() is a very slow operation.
Summary: Changing visibility on multiple layers + calling refreshProjection() is a ver...
Status: RESOLVED WORKSFORME
Alias: None
Product: krita
Classification: Applications
Component: Scripting (show other bugs)
Version: 4.2.7-beta1
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-17 14:25 UTC by Larpon
Modified: 2020-08-18 13:01 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Can be run in "Scipter" to illustrate the bug (304 bytes, text/x-python)
2019-10-21 09:02 UTC, Larpon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Larpon 2019-10-17 14:25:43 UTC
SUMMARY
Changing visibility on multiple layers + calling refreshProjection() in a script is a very slow operation. The more layers that are changed the more time the operation takes. It comes to a point where Krita can hang for several seconds.

This might/probably also affect other "visual" operations in the API.

STEPS TO REPRODUCE
1. Run a script that changes visibility on e.g. 6 layers in a 3000x3000 document
2. Watch the UI hang
3. Layer states are updated

OBSERVED RESULT
CPU is sweating

EXPECTED RESULT
CPU not sweating

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 18.04
KDE Plasma Version: 5.12.9
KDE Frameworks Version: 5.47.0
Qt Version: 5.9.5
Comment 1 Halla Rempt 2019-10-21 08:09:33 UTC
Could you please also attach the script you're using?
Comment 2 Larpon 2019-10-21 09:02:42 UTC
Created attachment 123375 [details]
Can be run in "Scipter" to illustrate the bug
Comment 3 Larpon 2019-10-21 09:04:13 UTC
I'm running it via "Scripter" plugin with the ".notes" layer selected in this file:
http://1499.dk/tmp/BUG-413088.kra
Comment 4 Halla Rempt 2019-10-21 09:18:40 UTC
Yes, it takes about 6 seconds here.
Comment 5 Scott Petrovic 2020-07-31 16:18:06 UTC
Can someone check this out again with the master branch?

I made a document at 3000x3000. I made 6 layers and filled them with content. I ran the script above. It took a fraction of a second to toggle the visibility.  

Maybe something with the node generation was fixed since this was filed.
Comment 6 Bug Janitor Service 2020-08-15 04:33:14 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 7 Larpon 2020-08-18 11:17:45 UTC
I *think* it's been resolved.

I haven't encountered anything since updating to 4.3.0
Comment 8 Halla Rempt 2020-08-18 13:01:09 UTC
I guess we can close then.