Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seems to run out pixel cache when processing many images #194

Closed
sseiichi opened this issue Apr 12, 2018 · 3 comments
Closed

seems to run out pixel cache when processing many images #194

sseiichi opened this issue Apr 12, 2018 · 3 comments
Labels
bug

Comments

@sseiichi
Copy link

@sseiichi sseiichi commented Apr 12, 2018

My program goes very slow after processed certain numbers of images in a for-loop.
This happens when Magick.Net starts writing files to temporary disk.
It seems Magick.Net depletes memory, but "using statement" and garbage collection seems to work well.

Here is my code.

            MagickNET.SetTempDirectory(@"C:\SomeTempFolder");

            for (int i = 0; i  < 10000; i++)
            {
                using (MagickImage image = new MagickImage(@"LargeImage.jpg"))
                {
                    image.Resize(new Percentage(50d));
                }
                Console.WriteLine(i); // At some point, this program goes slow.
            }
@sseiichi sseiichi changed the title Magick.Net seems to run out pixel cache when processing many images seems to run out pixel cache when processing many images Apr 12, 2018
@dlemstra dlemstra added the bug label Apr 12, 2018
@dlemstra

This comment has been minimized.

Copy link
Owner

@dlemstra dlemstra commented Apr 12, 2018

A similar issue has been reported here: https://www.imagemagick.org/discourse-server/viewtopic.php?f=27&t=33811 and a fix will be available soon.

@dlemstra

This comment has been minimized.

Copy link
Owner

@dlemstra dlemstra commented Apr 18, 2018

@sseiichi Can you give it another try with the latest release?

@sseiichi

This comment has been minimized.

Copy link
Author

@sseiichi sseiichi commented Apr 19, 2018

@dlemstra It's solved now with version 7.4.4. Thanks a lot.

@dlemstra dlemstra closed this Apr 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.