-
Notifications
You must be signed in to change notification settings - Fork 132
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
Provided benchmark correct only for small files #46
Comments
As the maintainer of both https://github.com/paolochiodi/resizer and https://github.com/blomming/image-server I'm really interested in this issue and in performance problems with image magick in general.
I'd also like to suggest a couple of tricks I use to speedup image resizing:
|
Thanks for your suggestions, I will investigate them further. With this issue I simply wanted to point out, that by using medium/high resolution images in test/benchmark.js, the results are not that compelling, that the readme states. e.g.
The above statement only true, if we use a small file. In the benchmark.js a 58x66 pixel image was converted to a 48x48 pixel image. OFF: For the sake of completeness I was benchmarking the gm module as well, which performed very similar to imagemagick. They both outperformed imagemagick-native. |
@laszbalo Let me know what you discover. Meanwhile let's see if @mash have a better explanation |
On my environment, same tests produce:
So a little bit different results, but I see the same trend; -native takes more time on larger images. Well, the trend is not surprising, |
Discovered node-imagemagick 's default options: |
With version 1.3.0 released just now using optional parameters to resize,
node-imagemagick-native is faster for all sizes on my environment, |
from this performance test, imagemagick is a bit fast than imagemagick-native what do you think? |
I have ran your benchmark with medium/large size images and got completely different result.
According to my measurements, imagemagick-native was 1.5/3 times slower than imagemagick.
I have tested it with this photo.
I downloaded the "Standard 4:3" and "HD 16:9" sizes of the same photo.
Here are my results:
imagemagick: 15.23ms per iteration
imagemagick-native: 1.45ms per iteration
Winner: imagemagick-native is 1050% faster
imagemagick: 33.06ms per iteration
imagemagick-native: 47.16ms per iteration
Winner: imagemagick is 142% faster
imagemagick: 248ms per iteration
imagemagick-native: 556.9ms per iteration
Winner: imagemagick is 224% faster
imagemagick: 37.4ms per iteration
imagemagick-native: 48.59ms per iteration
Winner: imagemagick is 129% faster
imagemagick: 178.96ms per iteration
imagemagick-native: 440.14ms per iteration
Winner: imagemagick is 254% faster
As far as I can tell, using imagmagick-native makes sense, only with small files.
What is your input on this?
With thanks,
Laszlo
The text was updated successfully, but these errors were encountered: