Page load times

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Page load times

Post by Brewhaus » Sun Aug 17, 2008 8:09 pm

We tested the page load time for our home page, and the results are downright shocking. Although the page appears to load quickly in our browsers (even after clearing the history and temp files), we are given times at or above 100 seconds for 56k. Obviously this is much to high, but I do not see any simple option for reducing the page size, short of redesigning with minimal (aka virtually no) graphics. But still, we are at 245k before we even start adding graphics. Style.css is 64.8k of that, and the application/javascript objects add up to 108k. Our graphics, in total, add up to 175k. So, even removing all graphics our page is at 245k.

Another site that we run, on different software, totals 144k with graphics (the graphics are 69k of that).

Have we done something that could have caused this? Is it just the way that these tests read things, and due to the differences in the software we see the difference in size / load times? If the load time is truly this high, which I doubt as I have even tested on my cell phone and had it downloaded in 10-15 seconds, then how do I correct the issue?

The site in question is http://www.hotsaucedepot.com. The second site, that I compared with, is http://www.brewhaus.com

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Page load times

Post by AbleMods » Sun Aug 17, 2008 9:29 pm

All I notice is a lot of different gif/jpg files. I counted approx 40 on the home page. Your other site has more than twice that, but they're mostly the same exact gif so it's not nearly the same impact as alot of mostly-unique images.

Try cutting back on the number of products in the grid near the bottom of the home content. It's taking alot of CSS to render those particular parts of the page.

Overall, I don't know where you got the statistics for a 56k page speed but it's quite possible it simply isn't accurate. Both sites loaded extremely well on my broadband Windows XP PC. If it was a basic "offline" calculation, then it's purely an estimate and nothing to worry about. If it's a web-based solution, there are a number of additional variables mixed into the equation that could easily skew the numbers one way (or the other for that matter).

Does anyone even use 56k any more? I had one guy call me from an oil drilling platform in the gulf of mexico - he was using a 56k microwave signal that daisy-chained to ANOTHER oil drilling platform before the signal went to a shore station. He wasn't movin' too swift but he was able to pull up a few product pages ;)

In the end, graphics sell.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
heinscott
Captain (CAPT)
Captain (CAPT)
Posts: 375
Joined: Thu May 01, 2008 12:37 pm

Re: Page load times

Post by heinscott » Mon Aug 18, 2008 10:18 am

Not sure if this will help, but it certainly decreased the size of our HTML significantly.
Try changing your global.asax to:

Code: Select all

<%@ Application Classname="AcApp" Language="C#" %> 
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.IO.Compression" %>

<script runat="server">
    protected void Application_BeginRequest(object sender, EventArgs e)
    {
        string ncp = Request.QueryString["NCP"];
        if (ncp != null)
        {
            HttpCookie authCookie = Response.Cookies["AC7.ASPXAUTH"];
            if (authCookie != null) authCookie.Expires = DateTime.Now.AddYears(-1);
            HttpCookie anonCookie = Response.Cookies["AC7.ASPXANONYMOUS"];
            if (anonCookie != null) anonCookie.Expires = DateTime.Now.AddYears(-1);
            HttpCookie sessionCookie = Response.Cookies["AC7.SESSIONID"];
            if (sessionCookie != null) sessionCookie.Expires = DateTime.Now.AddYears(-1);
            Response.Redirect(Request.Url.AbsolutePath);
        }

        HttpApplication app = (HttpApplication)sender;
        string acceptEncoding = app.Request.Headers["Accept-Encoding"];
        Stream prevUncompressedStream = app.Response.Filter;

        if (acceptEncoding == null || acceptEncoding.Length == 0)
            return;

        acceptEncoding = acceptEncoding.ToLower();

        if (acceptEncoding.Contains("gzip"))
        {
            // gzip
            app.Response.Filter = new GZipStream(prevUncompressedStream,
                CompressionMode.Compress);
            app.Response.AppendHeader("Content-Encoding",
                "gzip");
        }
        else if (acceptEncoding.Contains("deflate"))
        {
            // defalte
            app.Response.Filter = new DeflateStream(prevUncompressedStream,
                CompressionMode.Compress);
            app.Response.AppendHeader("Content-Encoding",
                "deflate");
        }

    }

    protected void Session_OnStart()
    {
        //SAVE THE REFERRER FOR USE BY THE ORDER MODULE
        if (Request.UrlReferrer != null) Session["SessionReferrerUrl"] = Request.UrlReferrer.ToString();
    }
</script>
This will enable compression for browsers that support gzip or deflate. This, of course, won't help for images, but should help a lot with css, javascript.

Scott

User avatar
Shopping Cart Admin
AbleCommerce Admin
AbleCommerce Admin
Posts: 3055
Joined: Mon Dec 01, 2003 8:41 pm
Location: Vancouver, WA
Contact:

Re: Page load times

Post by Shopping Cart Admin » Mon Aug 18, 2008 10:19 am

Hello,

While the CSS sheets are larger files on initial load they speed the loading of other pages since the browser caches them. A good tool to use on your css sheets is a css optimizer such as:

http://www.cssoptimiser.com/

I tried our style.css sheet which is 70k and it reduced it to 30k. Make sure you create a backup of your original file as it's very difficult to read after the optimization. It strips the comments, whitespace and truncates the colors it can. e.g. ffffff becomes fff.
Thanks for your support

Shopping Cart Guru
AbleCommerce.com
Follow us on Facebook

User avatar
heinscott
Captain (CAPT)
Captain (CAPT)
Posts: 375
Joined: Thu May 01, 2008 12:37 pm

Re: Page load times

Post by heinscott » Mon Aug 18, 2008 12:50 pm

errr, sorry... On my post, add:

if (app.Request.Url.ToString().Contains("ImageGenerator.aspx") ||
app.Request.Url.ToString().Contains("WebResource.axd") ||
app.Request.Url.ToString().Contains("ScriptResource.axd"))
return;

right before the line:

HttpApplication app = (HttpApplication)sender;

Javascript errors will occur otherwise.

Scott

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: Page load times

Post by Brewhaus » Mon Aug 18, 2008 8:59 pm

Okay- Mike- should I also incorporate heinscott's global.asax adjustment? And then follow that with the css optimizer? All in all, will this improve load speeds more than marginally? I just want to be sure that we will see reasonable gains, and are not doing this just to make ourselves feel better. :)

If it is worth proceeding, then if I need to make future adjustments I assume that I over write the optimized file with the original, make any necessary (or desired) changes, and then run the optimizer again?

User avatar
heinscott
Captain (CAPT)
Captain (CAPT)
Posts: 375
Joined: Thu May 01, 2008 12:37 pm

Re: Page load times

Post by heinscott » Tue Aug 19, 2008 7:46 am

Brewhaus...

My fix may help a bit, since it tries to compress textual elements, but I think your biggest problem may be your css images. It looks like for whatever reason, the images are missing from the App_Themes/HSD/images. There are about 6 or 7, that I can tell, in the speed reports show up as about 60K, I think because they are not present, and for some reason redirect to a larger page. When I save that redirect page, it equals about the same as the speed report gives for the graphic. Try either making sure that those graphics exist, or take them out of the css.

1 56736 CSS IMG http://www.hotsaucedepot.com/App_Themes ... tab_bg.gif
1 56735 IMG http://www.hotsaucedepot.com//images.sc ... com/12.gif
1 56733 CSS IMG http://www.hotsaucedepot.com/App_Themes ... tab_bg.gif
2 56727 CSS IMG http://www.hotsaucedepot.com/App_Themes ... tab_bg.gif
2 56724 CSS IMG http://www.hotsaucedepot.com/App_Themes ... er_bg1.jpg
1 56723 CSS IMG http://www.hotsaucedepot.com/App_Themes ... hover2.gif
2 56721 CSS IMG http://www.hotsaucedepot.com/App_Themes ... _hover.gif
1 56717 CSS IMG http://www.hotsaucedepot.com/App_Themes ... h_btn2.gif
2 56717 CSS IMG http://www.hotsaucedepot.com/App_Themes ... header.gif
2 56715 CSS IMG http://www.hotsaucedepot.com/App_Themes ... ton_bg.gif
1 56714 CSS IMG http://www.hotsaucedepot.com/App_Themes ... ueDots.gif
1 56713 CSS IMG http://www.hotsaucedepot.com/App_Themes ... ullet1.gif

These are the images in question. I think fixing this will fix much of your problem. Of course, every little bit helps, and compressing your CSS and html will help as well.
Good luck.

Scott

User avatar
Shopping Cart Admin
AbleCommerce Admin
AbleCommerce Admin
Posts: 3055
Joined: Mon Dec 01, 2003 8:41 pm
Location: Vancouver, WA
Contact:

Re: Page load times

Post by Shopping Cart Admin » Tue Aug 19, 2008 9:29 am

Hello,

The MAJOR issue with the page load times on this page is the CSS Images, there are almost 700k of them. Download time on a 56k modem is actually 236.43 seconds. HTML images could be reduced a bit and then by chopping the css sheet in 1/2 you'll be good.

CSS Images: 687705 143.26 9.84

HTML: 51105 10.39 0.47
HTML Images: 219679 49.38 6.76
CSS Images: 687705 143.26 9.84
Total Images: 907384 192.64 16.6
Javascript: 75134 15.97 1.40
CSS: 81459 17.43 1.63

Here's a tool I've found to be accurate for such things:

http://www.websiteoptimization.com/services/analyze/
Thanks for your support

Shopping Cart Guru
AbleCommerce.com
Follow us on Facebook

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: Page load times

Post by Brewhaus » Tue Aug 19, 2008 10:34 am

Are you referring to the same images that Scott did? Seeing as they are not apparently being used, and not in the images folder, I can simply remove the references to them and rid us of a tremendous amount of size.

I assume the HTML images are the product photos, category headers, tabs, etc.? In other words, the basic images that are seen as images. That can be a little tougher to reduce without totally removing them or reducing the number of featured items. Any suggestions on this one?

If I am correct above, then I can make those couple of changes and reduce the css sheet size to get us down to a reasonable load time.

Oh, and was I correct in how to handle any future changes of the style.css file? That is, if I need to make changes I over write the compressed file, make the changes, and compress the new file (after backing up, of course)?

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: Page load times

Post by Brewhaus » Tue Aug 19, 2008 9:00 pm

I have managed to find and remove all but
1 56735 IMG http://www.hotsaucedepot.com//images.sc ... com/12.gif
which is http://www.hotsaucedepot.com//images.sc ... com/12.gif

This is the ScanAlert logo, which is likely written as it is because it has a link to McAfee. It was actually a copy and paste from McAfee on the code to enter. How can I resolve this?

Also, it appears that one graphic does not seem to get along with the SSL, even though it is in the same folder as several others (the Assets folder). The specific graphic is http://www.hotsaucedepot.com/assets/support-troops.gif. How do I resolve this?

Incidentally, getting rid of the graphic references with no associated file has decreased the page to 450000, and a load time of 101 seconds. There is still a ways to go, but that is much better than 230+ seconds! I will work on a couple of the larger remaining graphics and go from there.

User avatar
Shopping Cart Admin
AbleCommerce Admin
AbleCommerce Admin
Posts: 3055
Joined: Mon Dec 01, 2003 8:41 pm
Location: Vancouver, WA
Contact:

Re: Page load times

Post by Shopping Cart Admin » Tue Aug 19, 2008 9:06 pm

Hello,
Also, it appears that one graphic does not seem to get along with the SSL, even though it is in the same folder as several others (the Assets folder). The specific graphic is http://www.hotsaucedepot.com/assets/support-troops.gif. How do I resolve this?
The image is ok, so it's most likely a fully qualified URL causing the trouble.

Be sure the reference is relative like

/assets/support-troops.gif

not

http://www.hotsaucedepot.com/assets/support-troops.gif
Thanks for your support

Shopping Cart Guru
AbleCommerce.com
Follow us on Facebook

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: Page load times

Post by Brewhaus » Tue Aug 19, 2008 9:36 pm

Corrected, and all is good. The problem was because we are having problems with the HTML editor- we cannot access the files on the server, so I manually entered it. All if fixed now on that issue.

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: Page load times

Post by Brewhaus » Wed Aug 20, 2008 8:51 pm

I have optimized all of the images on the page, plus the css file itself. This has brought the page load time down to 78 seconds (higher on a different load check site), but that is a dramatic difference. Is there anything that I should watch for as far as hiccups as a result of optimizing the css file? Incidentally, it dropped it fro 64k to 24k.

We still cannot figure out how to resolve the size of the HackerSafe image, which is likely less than 2k but shows as more than 50k. Does anyone have any suggestions on this? I think that is about the last thing that I can do to lower the page size, as I am sure that there is nothing that can be done about the couple of larger scripts.

User avatar
Shopping Cart Admin
AbleCommerce Admin
AbleCommerce Admin
Posts: 3055
Joined: Mon Dec 01, 2003 8:41 pm
Location: Vancouver, WA
Contact:

Re: Page load times

Post by Shopping Cart Admin » Wed Aug 20, 2008 9:01 pm

Hello,

The CSS optimizer shouldn't affect anything, it just removes whitespace, comments and abbreviates some numbers. Sounds like you've got the page down to a reasonable number, good effort !
Thanks for your support

Shopping Cart Guru
AbleCommerce.com
Follow us on Facebook

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: Page load times

Post by Brewhaus » Wed Aug 20, 2008 10:29 pm

Thanks. I did find that with the optimized css file the page would not display properly on Firefox (that browser has given me headaches!), so I had to put the original style.css file back in place. I noticed that there was an option to retain line breaks. Would this make a difference? Leaving the css as is only adds 40k, which is less than 10 seconds, but still, the faster the better.

User avatar
Shopping Cart Admin
AbleCommerce Admin
AbleCommerce Admin
Posts: 3055
Joined: Mon Dec 01, 2003 8:41 pm
Location: Vancouver, WA
Contact:

Re: Page load times

Post by Shopping Cart Admin » Wed Aug 20, 2008 10:33 pm

Good Evening,

The CSS sheet is only loaded once, I'd leave it alone. Not worth the hassles given you're working to improve the speed for a total of 2 customers in the US that are still using a 56k modem. Both of which are afraid to put their CC number into an online form :)
Thanks for your support

Shopping Cart Guru
AbleCommerce.com
Follow us on Facebook

Mark Harris
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 37
Joined: Fri Mar 28, 2008 3:50 pm
Location: Perth, Western Australia
Contact:

Re: Page load times

Post by Mark Harris » Thu Aug 21, 2008 2:56 am

If you're running your site on Windows 2008, you can enable compression on ALL files it sends. This will gzip everything to any browser that accepts it, meaning your CSS, html, and even images will get squashed down considerably.

Our servers are in the USA, while we are in Australia (most of our customers are US/Euro) so we have a 350ms ping to the server. Load times from Australia dropped by about 70% with compression turned on.

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: Page load times

Post by Brewhaus » Thu Aug 21, 2008 7:46 am

Actually, I heard that one of them was upgrading, so that leaves only one. :lol:

Our server is still archaic- we run Windows 2003. And, as it works fine, we cannot justify upgrading it.

User avatar
Shopping Cart Admin
AbleCommerce Admin
AbleCommerce Admin
Posts: 3055
Joined: Mon Dec 01, 2003 8:41 pm
Location: Vancouver, WA
Contact:

Re: Page load times

Post by Shopping Cart Admin » Thu Aug 21, 2008 8:02 am

Hello,

Here's the actual stats on broadband usage as of a year ago. It's sure to be down a 'bit' further since Feb 2007.

http://www.websiteoptimization.com/bw/0703/
US broadband penetration broke 80% in February 2007, growing to 80.16% among active Internet users. Narrowband users connecting at 56Kbps or less now comprise 19.84% of active Internet users, down 1.09 percentage points from 20.93% January 2007 (see Figure 1).
Thanks for your support

Shopping Cart Guru
AbleCommerce.com
Follow us on Facebook

kastnerd
Commodore (COMO)
Commodore (COMO)
Posts: 474
Joined: Wed Oct 22, 2008 9:17 am

Re: Page load times

Post by kastnerd » Fri Jan 09, 2009 3:08 pm

Shopping Cart Admin wrote:Hello,

The MAJOR issue with the page load times on this page is the CSS Images, there are almost 700k of them. Download time on a 56k modem is actually 236.43 seconds. HTML images could be reduced a bit and then by chopping the css sheet in 1/2 you'll be good.

CSS Images: 687705 143.26 9.84

HTML: 51105 10.39 0.47
HTML Images: 219679 49.38 6.76
CSS Images: 687705 143.26 9.84
Total Images: 907384 192.64 16.6
Javascript: 75134 15.97 1.40
CSS: 81459 17.43 1.63

Here's a tool I've found to be accurate for such things:

http://www.websiteoptimization.com/services/analyze/
This is a vary good tool
Even tho a stock able is 263404 bytes 65.30 seconds

Post Reply