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
unnormal memory usage (x4) #1278
Comments
Thanks for your report. This is already addressed in #1269 |
Reading a 2 MB image with GD used 5.70 MB in a example I just created. How did you calculate these values? |
the image i have used: |
Thanks. The topic will be pursued further here. |
One more note: The decoding process of Intervention Image involves more than just opening the image. The following tasks are performed:
In your example image, the image rotation is set to The examples from your code samples are therefore not 1:1 comparable. |
thanks for your notes. I think any further processing must be optional and developers should be able to ignore them with a flag or some other way. |
Describe the bug
reading images uses a lot more memory than it should. reading a 2 MB image using GD uses only 160 MB but the library uses 545mb!
Code Example
$manager = new ImageManager(new Driver());
$image = $manager->read($filePath, FilePathImageDecoder::class); // 545mb memory peak
vs
$image = imagecreatefromjpeg($filePath); // 160mb memory peak
Expected behavior
lower memory usage (near 160MB)
Images
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: