title: How to speed up libjpeg decompression
body: <p>We are using libjpeg for JPEG decoding on our small embedded platform. We have problems with speed when we decode large images. For example, image which is 20 MB large and has dimensions of 5000x3000 pixels needs 10 seconds to load.</p>
  
  <p>I need some tips on how to improve decoding speed. On other platform with similar performance, I have the same image load in two seconds.</p>
  
  <p>Best decrease from 14 seconds to 10 seconds we got from using larger read buffer (64 kB instead of default 4 kB). But nothing else helped.</p>
  
  <p>We do not need to display image in full resolution, so we use scale_num and scale_denom to display it in smaller size. But I would like to have more performance. Is it possible to use some kind of multithreading etc.? Different decoding settings? Anything, I ran of ideas. </p>