silverstripe-framework/src/Assets
Ingo Schommer 6e561f00bd Force GC in GDBackend
This has been discussed previously, and was assumed to be handled by PHP automatically:
https://github.com/silverstripe/silverstripe-framework/issues/2739#issuecomment-32603005
It’s unclear if its a regression in SS4.

Tested with PHP 5.6.29, by setting xdebug breakpoints
and inspecting memory_get_usage() before and after GDBackend->manipulateImage().
Even a single 7MB JPEG straight from my DSLR (6000x300) can chomp bring the system from 30MB to >128MB memory use.
That’s in addition to the 7MB of PHP memory required for the $content variable.
Note that the image manipulations likely happen on the raw bitmap, which is much larger than the 7MB compressed JPEG.

Checked ImagickBackend, which doesn’t have this issue (and only uses about half the memory for the same set of images).
2017-01-06 18:45:56 +13:00
..
Flysystem PSR2: Whitespace-only changes 2016-11-29 12:31:16 +13:00
Storage API Updates to Form, ValidationResponse, ValidationException 2016-12-09 14:24:11 +13:00
AssetControlExtension.php PSR2: Whitespace-only changes 2016-11-29 12:31:16 +13:00
AssetManipulationList.php PSR2: Whitespace-only changes 2016-11-29 12:31:16 +13:00
File.php Consolidate temporary file creation and deletion logic. 2016-12-29 22:32:04 +13:00
FileFinder.php PSR2: Whitespace-only changes 2016-11-29 12:31:16 +13:00
FileMigrationHelper.php PSR2: Whitespace-only changes 2016-11-29 12:31:16 +13:00
FileNameFilter.php PSR2: Whitespace-only changes 2016-11-29 12:31:16 +13:00
Filesystem.php PSR2: Whitespace-only changes 2016-11-29 12:31:16 +13:00
Folder.php PSR2: Whitespace-only changes 2016-11-29 12:31:16 +13:00
GDBackend.php Force GC in GDBackend 2017-01-06 18:45:56 +13:00
Image_Backend.php Merge branch '3' 2016-12-15 12:20:29 +00:00
Image.php PSR2: Whitespace-only changes 2016-11-29 12:31:16 +13:00
ImageManipulation.php Force GC in GDBackend 2017-01-06 18:45:56 +13:00
ImagickBackend.php Merge branch '3' 2016-12-15 12:20:29 +00:00
Thumbnail.php PSR2: Whitespace-only changes 2016-11-29 12:31:16 +13:00
Upload_Validator.php PSR2 cleanup 2016-11-29 16:18:48 +13:00
Upload.php PSR2 cleanup 2016-11-29 16:18:48 +13:00