Skip to content

fillerwriter/imageprocessingbenchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Benchmark scripts comparing GD, ImageMagick, and GraphicsMagick

Background

We needed a way to validate the server impact of several different image resizing libraries for our Drupal site. Out of the box, Drupal uses the GD library packaged with PHP. Site administrators can also install the ImageMagick module to use either ImageMagick or GraphicsMagick.

This benchmark attempts to simulate the way that Drupal would process an image with each library.

Requirements

  • Node.js 4.x.x - For primary script runner
  • PHP 5.5.x - For individual benchmark scripts
  • Imagemagick
  • Graphicsmagick

Install

npm install

Run Test

node runner.js

Preliminary Results

Running this script on a 2015 Macbook Pro, I observed the following results via the script output and Activity Monitor.

Library Processing Time PHP thread ~ Memory usage Image Processing thread ~ Memory Usage
PHP GD 17.54 seconds 23.9M N/A
ImageMagick 24.19 seconds 5.1M 33.5M
GraphicsMagick 21.15 seconds 5.1M 20.1M

@TODO

  • Improvements to memory monitoring of secondary processes. Because the individual thread clears very quickly, node can't capture the memory usage as a part of the script as it currently stands. Need to investigate better way to check. Currently, the best way to monitor threads is through OS-level monitor like ps, htop, or Activity Monitor.

Reference

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published