Summary: | Transform mask isn't multi-threaded | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Alex <eneeen> |
Component: | General | Assignee: | Krita Bugs <krita-bugs-null> |
Status: | REPORTED --- | ||
Severity: | wishlist | CC: | griffinvalley, halla |
Priority: | NOR | ||
Version: | 4.0 pre-alpha | ||
Target Milestone: | --- | ||
Platform: | Microsoft Windows | ||
OS: | Microsoft Windows | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Natron simple resize node setup |
Description
Alex
2018-01-04 22:20:46 UTC
How do you know it "could" be multithreaded? That sounds like you have a plan on how to multithread it? Because as far as I know the problem with layers and transforms is that it is too difficult to subdivide the transformation of a single layer into multiple tasks and then get back something that can be patched together again... No, I don't have plan, just noticed this as it was taking pretty long. I was not aware of the problem here, sorry. Is title now ok? Created attachment 109691 [details] Natron simple resize node setup I've done little research regarding this and tested ImageMagick, GMIC, PS and Natron. I was using this photo to test: https://static.pexels.com/photos/770526/pexels-photo-770526.jpeg IM: convert test.jpg -filter Cubic -resize 300% out.jpg GMIC: gmic test.jpg -resize 300%,300%,100%,100%,5 output out.jpg PS: open and resize 300% Natron: Read node -> Resize node with scale 3 and cubic filter -> Viewer node, GPU rendering disabled and display clip disabled and zoomed to 100% IM indeed is using only 1 cpu and it takes about 23 seconds. GMIC seems to use all cpus and it takes about 9 seconds with cubic and 2 seconds with nearest-neighbor interpolation (just -resize 300%,300% in command line) PS: about 3 seconds with cubic interpolation and... Natron: about 2 seconds with 8 threads set and about 5 seconds with 1 thread set inside options so it's both really, really fast and multi-threaded. I couldn't test Krita as it limits image resize to 10000px, but maybe some code from Natron can be used: https://github.com/MrKepzie/Natron I couldn't find resize node specific code though... Natron actually doesn't resize the image; it calculates a transformed version of the image that fits in the viewport from the original image -- that's what you get with a node editor. It has no bearing on what an pplication like Krita or Gimp does. Indeed you are right, I forgot that I should have rendered image not only make preview! Moreover seems I've not zoomed to 100% anyway, doh, nvm. Timings with final render are: 32 seconds with 1 thread 10 seconds with 8 thread (cpu really to 100%) So it's about same as GMIC. Hope this findings can be useful anyway. |