Bug 438547

Summary: Animation curves - Flatten layer is slow
Product: [Applications] krita Reporter: grum999
Component: AnimationAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: ahab.greybeard, eoinoneill1991
Priority: NOR    
Version: nightly build (please specify the git hash!)   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: example file ready to use

Description grum999 2021-06-13 11:07:11 UTC
Created attachment 139282 [details]
example file ready to use

SUMMARY

Flatten layer action is very slow when applied to a paint layer on which an animated transform mask is attached


STEPS TO REPRODUCE
1. Create a document with a paint layer
2. Add a transform mask to paint layer
3. Define a 600frames animation with animation curves applied to transform mask
4. Flatten paint layer

(or download attached example file)


OBSERVED RESULT

With a 24CPU/64GB RAM computer (with 12CPU for Frame rendering clones limits)
- Render animation as PNG sequence: took around 15s 
- Merge paint layer with transform mask: took around 1hour


EXPECTED RESULT

It shouldn't be so long to flatten layer.
If rendering 600frames as PNG files took only 15s, we can expect flatten should be as fast as rendering (or even if flattening is a little bit longer than rendering for miscellaneous reason, it should not be so long)


SOFTWARE/OS VERSIONS
krita-5.0.0-prealpha-c25d2e1-x86_64.appimage
Comment 1 Ahab Greybeard 2021-06-14 08:47:23 UTC
I can confirm this for the Jun 11 5.0.0-prealpha (git c25d2e1) appimage on Debian 10 using the attached example file.

Rendering to an image sequence took 30 seconds. I gave up waiting for the Flatten Layer operation to finish.
Comment 2 Eoin O'Neill 2021-06-15 01:36:50 UTC
This is a duplicate of 435716, I'm working on it, though it may not be simple due to flattening not using threads (yet.)

*** This bug has been marked as a duplicate of bug 435716 ***