Combining GIFs insanely slow? #1692
-
Hello, I got a gif File size: 330.4KiB, width: 300px, height: 169px, frames: 24, type: gif and another gif at similar size. It takes 1sec to combine these two gifs. I want to generate gifs on the fly, so I might add many of the same gif, like GIF A + GIF A + GIF B or GIF B + GIF A + GIF A I currently load Gif A into a MagickImageCollection, Gif B into a MagickImageCollection and then I create a new "Final" collection where I can call function AddGifA() and it will iterate the MagickImageCollection for gif A, clone each frame and add it to the final collection etc until im done. Sometimes I need to add the same gif 5x times a row or add like a total of 10 gifs. It seems to add 500ms every time I add one gif, why is it linear like that? I am nowhere near starved for resources, it barely uses any RAM and cpu power, why is it so slow when I .Write() on the final collection? What can I do to optimize? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I don't have a good answer but I suspect the encoder is not optimized for performance? Do you have something small that can be used to reproduce this? |
Beta Was this translation helpful? Give feedback.
-
I managed to speed it up by setting Dither to No, it went from 6 sec to
1.3sec
That's really good imo, but my pc is really good so need to see on server
too
Maybe there is other options I can do to improve the writing speed ?
…On Tue, Aug 13, 2024, 22:37 Dirk Lemstra ***@***.***> wrote:
I don't have a good answer but I suspect the encoder is not optimized for
performance? Do you have something small that can be used to reproduce this?
—
Reply to this email directly, view it on GitHub
<#1692 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A2B23N74C3WHWZVYZ4GE44LZRJU7VAVCNFSM6AAAAABMO3FPGKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMZTGAZDOOI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
Disabling dithering will improve the speed. I don't know any other options that can improve this.