first page loads slowly

Discussion in 'ASP.NET 2.0' started by geminirand, Jul 7, 2007.

  1. The first page visited on my website loads slowly, but only when you first get to it. If you navigate my site and come back, the page is just as fast as any other page.

    Does this suggest the application start up is somehow slow? What can I do to speed up page load?

    There is a database call on some pages of course, but my data only changes once a week at best. What's the best way to avoid unneeded database calls?

    Thanks,
    Randy
     
  2. Could you provide us with a url to your site?

    The number of database callsreally depends on the design of your site? Storing information within sessions(data stored per user session across multiple pages),viewstates(ASP.NET manages that itself) and off course cachingrather than pulling data on every page load can lessen the number of calls. If you are using MS SQL 2005,sql dependency is another thing you may want to look into to avoid database polling for changes etc....
    </o:p>

    Vikram

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. Hi Vikram,


    The site is www.randyellefson.com


    Thanks for the database tips. I suspect that's not the problem due to it only happening when first having a page load.


    Thanks,


    Rand
     
  4. It appears that your first initial load is loading quite a few objects. I tested your site with WebsiteOptimization.com and here are the results...

    Download Times*
    Connection Rate Download Time
    14.4K 321.47 seconds
    28.8K 164.24 seconds
    33.6K 141.77 seconds
    56K 87.86 seconds
    ISDN 128K 31.76 seconds
    T1 1.44Mbps 9.15 seconds

    Your site is loading approximately 405744 bytes of objects.

    I also used t1shopper.com and their results with someone with a 768 Kbps connection speed is 4.23 seconds.

    http://www.websiteoptimization.com/
    http://www.t1shopper.com/tools/calculate/downloadcalculator.shtml

    Your probably correct with the db connection as it does not seem to slow down your site, however you may want to try optimize your site a little more. I've notice 'Recent Headlines' news portion of your page that pop up windows open when you hover the link with the mouse. Can you try dropping the background image and just keep the text on the pop up window. This is of course all up to you. My personal opinion is that the site looks very well done and aesthetically pleasing to the eyes.
     
  5. Hi Raymond


    Thanks for the reply and links to those testing sites. I optimized some images, shrinking them quitea bit, but it didn't change it too much so far. I might have to remove some stuff .


    One thing I don't understand is that images should be on their computer after having been to the site once, so that it's faster on subsequent visits, but it's always the same load speed when you first hit the site. This is why I thought it might have something to do with the application start up process, but that is grasping at straws.
     
  6. mjp

    mjp

    The application start up would only affect a visitor if the application hadn't been loaded in the past 20 minutes. If it has, it will not have to compile/load for each visitor, as it is already running.

    You just have a lot of data to download on that index page. I ran the same test that Raymond did and got a 9.33 seconds/T1 result (real life load speed of about 7 seconds here on our office T1). That is just the data, not any application startup.

    That isn't bad for a broadband user, but not good for someone on a 56k modem. You'd have to really want to see a site to wait a minute and a half for it to load. But a lot of designers don't take modem users into account anymore, as broadband becomes more widespread. That's a judgement call on your part.

    mjp

    DiscountASP.NET - Microsoft Gold Certified Partner
    - asp.netPRO Magazine 2007 Readers' Choice Award for Best Hosting Service
    - Visual Studio Magazine 2007 Readers' Choice Award for Best Hosting Service
     
  7. Looks and works great here Randy on standard cable modem:

    5 seconds the 1st page the 1st time - zero afterwards.

    Great visuals - Netflicks rocks [​IMG]
     

Share This Page