Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ennija 44 posts 126 karma points
    Jun 29, 2016 @ 08:46
    Ennija
    0

    I use ImageGen

    > src="~/ImageGen.ashx?width=640&[email protected]"
    > 
    

    ImageGen.config

    >   <Class Name="default" OverridesQueryString="true">
    >     <AllowUpsizing>true</AllowUpsizing>
    >     <CachingTimeSpan>3600</CachingTimeSpan>   </Class>   <Class Name="Thumbnail" OverridesQueryString="true">
    >     <InheritFromClass>default</InheritFromClass>
    >     <CachingTimeSpan>3600</CachingTimeSpan>   </Class>
    

    why pictures loading remained more slowly? picture loading time is 1,88s without ImageGen 410ms

    I wanted to Caching image but its not working.

  • Douglas Robar 3570 posts 4671 karma points MVP ∞ admin c-trib
    Jun 29, 2016 @ 09:53
    Douglas Robar
    0

    Hi, Ennija,

    It's odd for it to be so slow! Can you tell me a bit more about what's happening, please?

    Can you give me an example of the <img src=" " /> tag as it appears to the website visitor, please? Are the images local to your site or are they on a remote server somewhere?

    Also, how big (pixel dimensions or file size) is the original image? If it is massive then the initial resizing process can be sluggish if the machine is low on recourses. Subsequent requests for the same resized image should be quick though because server-side caching is active for all ImageGen installations.

    Client-side caching will be active if you're running with ImageGen Professional (use imagegen.ashx?version on your site to see if you are in Professional mode), because you added that to your "default" class.

    cheers,
    doug.

  • Ennija 44 posts 126 karma points
    Jun 29, 2016 @ 10:21
    Ennija
    0

    its my src

    <img src="~/ImageGen.ashx?class=VendorImage&[email protected]"
        title="@vendor.ImageTitle" alt="@vendor.ImageAlt">
    

    and class

    <Class Name="VendorImage" OverridesQueryString="true">
        <InheritFromClass>default</InheritFromClass>
        <CachingTimeSpan>3600</CachingTimeSpan>
        <Height>140</Height>
        <Width>140</Width>
        <Compressionr>100</Compressionr>
      </Class>
    

    imaga i get to remote server.

    ImageGen version 2.9.1

    Image size different size

  • Douglas Robar 3570 posts 4671 karma points MVP ∞ admin c-trib
    Jun 29, 2016 @ 11:27
    Douglas Robar
    0

    Thanks.

    imaga i get to remote server.

    Sorry, I do not understand if the image is local to your website or if it is a remote image on another server that you have to request using http.

    Can you tell me what @vendor.ImageUrl is for a typical image?

    Is it something like /media/1234/myphoto.jpg or http://example.com/myphoto.jpg or http://example.com/photos?id=333

    cheers,
    doug.

  • Ennija 44 posts 126 karma points
    Jun 29, 2016 @ 11:31
    Ennija
    0

    o sorry for my English.

    I use remote image on another server

    <img alt="NEWSite_1920x394_02" class="first-slide" src="/ImageGen.ashx?Class=Banner&amp;image=http://media.elko.lv/media/7881/newsite_1920x394_02.png">
    
  • Douglas Robar 3570 posts 4671 karma points MVP ∞ admin c-trib
    Jun 29, 2016 @ 12:06
    Douglas Robar
    0

    Thank you for the details, that is very helpful!

    I have tried this on my machine and don't find a big performance problem.

    The remote image (http://media.elko.lv//media/7881/newsite1920x39402.png) is downloaded to my browser in 380ms to 1.34s. I am using the Chrome browser's "Network" tab in the Developer Tools panel and have put a check mark in the "Disable cache" option. That way I can see the true speed of the delivery of the 572KB image.

    Resizing the remote image with ImageGen often displays the image in 600ms but I did see it as high as 1.5s. This suggests there is a delay of up to 200ms when using ImageGen for these remote images, which is reasonable.

    One of the things you want to remember when ImageGen is resizing remote images is that ImageGen will always download the remote image (380ms to 1.34s in my tests) to be sure that the remote image has not changed since the last time it was requested. If it has changed, ImageGen will resize and cache the updated image. If it has not changed, ImageGen will send the resized image that is already in its cache. The time to send the resized image to the visitor is one to two tenths of a second.

    It seems that the speed of the remote server accounts for the majority of any delay you see with ImageGen.

    You can improve performance in a number of ways:

    • use client-side caching (which you are doing with the <CachingTimeSpan> setting)
    • Improve the bandwidth media.elko.lv so that images download more quickly and with more consistent timing
    • Stop using remote images if possible. Local images will be significantly faster because the original image will not have to be downloaded to check for changes. Instead, local images can be checked instantly with no delay.

    cheers,
    doug.

Please Sign in or register to post replies

Write your reply to:

Draft