Options

CustomSize images.get

jiminyjiminy Registered Users Posts: 10 Big grins
I have been looking at the CustomSize parameter on the smugmug.images.get request in order to get an image sized to 2048 for the new iPad 3. This works quite well except for the several second delay on the server. I assume the server is taking this time to actually generate the requested size image.

I just wanted to check if there is any other recommended way to get a higher resolution image, other than to use the CustomSize parameter. It does slow the download quite a bit with the multisecond delay to generate the image, compared to the X3LargeUrl size for example.

Any comments or suggestions much appreciated.

thanks
Jim

Comments

  • Options
    haavardhaavard Registered Users Posts: 8 Beginner grinner
    edited May 21, 2012
    That's sounds strange, a single resizing would not produce such a delay in my experience. Although the algorithm used is optimized for quality, the setup is built for speed and scalability.

    I'm pulling 30+ image albums with customsizes (altbeit at half the resolution) with negligible performance impact

    Could there be some bottleneck in your code causing the delay, such as multiple requests instead of single, large one for example?
  • Options
    jiminyjiminy Registered Users Posts: 10 Big grins
    edited May 22, 2012
    Hi Haavard, thanks for your input. I have looked at the download NSLog statements in my code in more detail. What I see is a 3 to 5 second delay between issuing the request to the server and the first response with data that calls didReceiveData in my code. My code isn't doing anything during this time excepting waiting for a response.

    Sometimes I see a redirect coming back from the server with a new url that does not have the form of widthxheight.jpg, but rather is just a "normal" url. In those cases the delay from request to first data back is about 300 ms, which is about what I see when downloading an X2LargeUrl. It turns out that in this case the original file size on the server is smaller than my requested 2048 width, so the server just returns my original file directly - hence only a short delay.
Sign In or Register to comment.