Displaying a Thumbnail vs. creating a thumbnail

Discussion in 'ASP .Net' started by David Lozzi, Feb 1, 2006.

  1. David Lozzi

    David Lozzi Guest

    Hello,

    I'm wondering whats the best method to use for displaying several photos'
    thumbnails. One method I know is to dynamically resize the photo at the time
    the page is loaded. What does this do to server/site performance? The other
    is to copy the photo at time of upload and create a thumbnail then, have two
    separate images, therefor when displaying its just pulling the actual image.

    What do you think??

    --
    David Lozzi
    Web Applications Developer
    dlozzi@(remove-this)delphi-ts.com
     
    David Lozzi, Feb 1, 2006
    #1
    1. Advertising

  2. David Lozzi

    john smith Guest

    David Lozzi wrote:
    > Hello,
    >
    > I'm wondering whats the best method to use for displaying several photos'
    > thumbnails. One method I know is to dynamically resize the photo at the time
    > the page is loaded. What does this do to server/site performance? The other
    > is to copy the photo at time of upload and create a thumbnail then, have two
    > separate images, therefor when displaying its just pulling the actual image.
    >
    > What do you think??
    >


    Creating thumbnails on the fly, every single time they're displayed is
    CPU intensive (especially if there are a good number of visitors at the
    same time). And if your images are big it can also generate a good
    amount of disk IO (assuming images don't have built-in thumbnails or
    that you don't use them - actually generating them), say you're
    displaying 50 images/page, and that the source is 50 ~1MB jpegs, then it
    has 50MB of images to read from disk before it can even resize them
    (that's a lot of data to process too), for every single page load.

    What I usually do is look for the thumbnail at page load, if it's not
    there then generate it and save a copy to the disk for future page loads
    (only needs to be generated once). That way there's no issue of
    maintaining thumbnails either (like, if someone adds pics to the site by
    FTP'ing them or such, your upload page won't generate thumbnails, then
    what? What if they got deleted? etc)
     
    john smith, Feb 1, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?YXNhZA==?=

    ASP.NET thumbnail creating and saving

    =?Utf-8?B?YXNhZA==?=, Apr 9, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    3,998
    Brock Allen
    Apr 9, 2005
  2. Daves

    creating thumbnail from image

    Daves, Feb 6, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    426
    S. Justin Gengo [MCP]
    Feb 6, 2006
  3. cantbprince

    Creating Thumbnail Images on the fly

    cantbprince, Apr 11, 2006, in forum: Java
    Replies:
    3
    Views:
    4,802
    Oliver Wong
    Apr 11, 2006
  4. Ed
    Replies:
    5
    Views:
    3,558
    Andy Dingley
    Jan 22, 2005
  5. D.Selby
    Replies:
    0
    Views:
    111
    D.Selby
    Jul 5, 2003
Loading...

Share This Page