![]() ![]() ![]() All versions showed similar (good) performance, indicating that the problem is not related to the PHP version itself, but rather something in the Docker image.Īlso, I tried a Dockerfile without using install-php-extensions from mlocati/php-extension-installer, by installing ImageMagick manually in the Dockerfile: I also ran the test script on the same instance without Docker (using PHP from sudo yum -y install php70-cli php70-common php70-pecl-imagick) for PHP 7.0, 7.1, and 7.2. It is clear that starting from PHP 7.1, something is wrong with the performance of the \Imagick::resizeImage() operation, since it’s approximately 10 times slower than in PHP 7.0. I obtained the following output/results: PHP 7.0: ~2s ![]() with substituted by some valid version):ĬOPY -from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/įinally, I ran the test script from above using docker run -it imgbench php imgbench.php.Īll the files used for this test, can be found here: imgbench.zip. Then, I built the following Dockerfile (using docker build -t imgbench. I created a new AWS EC2 t3.medium instance with the Amazon Linux AMI and installed Docker using sudo yum install docker. $image_blob = $image-> getImageBlob() bench(" blob") $image-> setInterlaceScheme( Imagick:: INTERLACE_JPEG) bench(" interlace") $image-> setImageCompressionQuality( $image_quality) bench(" compress") $image-> resizeImage( $image_size, $image_size, Imagick:: FILTER_LANCZOS, 1, true) bench(" resize") ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |