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

Implement a workaround for common OutOfMemoryError cases #69

Closed
GoogleCodeExporter opened this issue Jul 25, 2015 · 15 comments
Closed

Implement a workaround for common OutOfMemoryError cases #69

GoogleCodeExporter opened this issue Jul 25, 2015 · 15 comments

Comments

@GoogleCodeExporter
Copy link

There have been increasing number of reports of `OutOfMemoryError`s occurring 
when using Thumbnailator. (Issue 1)

In many cases, this is a result of trying to resize large input images, which 
causes Thumbnailator to read the entire image to the JVM heap memory, resulting 
in the `OutOfMemoryError`s due to the heap being filled up.

A permanent fix to the problem is better achieved by changing the Thumbnailator 
architecture to not require loading the entire image to memory before resizing 
the image, but this will require a comprehensive rewrite, which is planned for 
a later release.

To address the `OutOfMemoryError` in a more timely manner, a temporary 
workaround should be possible by examining the image metadata to find out the 
image size, and accordingly apply a subsampling on the read operation to reduce 
the amount of memory used when reading the image.

Original issue reported on code.google.com by coobird...@gmail.com on 4 May 2014 at 5:36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant