Imagizer
Posted: 2016-04-13T09:09:02-07:00
I came across this interview, which might be of interest to IM developers: https://scaleyourcode.com/interviews/interview/23
The interviewee describes a closed source product (written from scratch, not IM-based) of his that claims to resize JPEGs of any size in 25ms or less on m3.medium AWS instances. I have ex-colleagues of mine at deviantArt who've tried it and confirmed the outstanding performance. He shares enough information in the interview to piece together the techniques used, namely:
- the inspiration for the code is an unnamed Japanese paper which describes how to process the Y, U and V components of a JPEG in parallel
- it uses the technique of only sampling parts of the image, whereby only parts of the JPEG are read, instead of every pixel, according to the needed target thumbnail size (similar to IM's jpeg:size, I presume)
- it leverages "vector math" in the processor, which I assume means AVX instructions and registries, since he mentions registries at some other point of the interview
I was mostly curious to know if these optimizations are something IM already does to a degree. And if not, if that sounds like something IM developers might explore.
The interviewee describes a closed source product (written from scratch, not IM-based) of his that claims to resize JPEGs of any size in 25ms or less on m3.medium AWS instances. I have ex-colleagues of mine at deviantArt who've tried it and confirmed the outstanding performance. He shares enough information in the interview to piece together the techniques used, namely:
- the inspiration for the code is an unnamed Japanese paper which describes how to process the Y, U and V components of a JPEG in parallel
- it uses the technique of only sampling parts of the image, whereby only parts of the JPEG are read, instead of every pixel, according to the needed target thumbnail size (similar to IM's jpeg:size, I presume)
- it leverages "vector math" in the processor, which I assume means AVX instructions and registries, since he mentions registries at some other point of the interview
I was mostly curious to know if these optimizations are something IM already does to a degree. And if not, if that sounds like something IM developers might explore.