PDA

View Full Version : Page Load Speed



niallb
04-17-2012, 06:12 AM
Hi,
my page speed has slumped alarmingly (see BestBears (http://bestbears.co.uk) ). Ive used GTMetrix to see what the problem seems to be and there are a couple of suggestions that I dont quite understand.

1)Add an Expires or a Cache Control Header. Im really unsure what to do or how to go about it, would appreciate the thoughts of some more experienced guys before I dive in

2) Enable Keep Alive. I havent got a clue what this means, let alone how to implement it.

Do any of you use tools like GTMetrix for your sites or can you make any recommendations?

Niall

michael_s
04-17-2012, 07:59 AM
1. This can be done in your templates meta tags or via .htaccess or both. Google "expires meta tag" and "expires .htaccess"

2. This is an apache server setting. If you don't have root access to the apache configuration file you cannot set this. Most hosts have this optimized for their needs, but if you are on your own dedicated server of vps, you can change it yourself. Again, google is your friend.

Additionally, osCmax has the Page Cache in the admin panel. Be sure to enable it. It loads your site a lot faster when the cache is on and primed.

Finally, make sure you are on a fast server. If the server is overloaded and slow, it will kill your page speed.

pgmarshall
04-17-2012, 10:15 AM
1. Worthy of note that I have actually already added this to the core:




# BOF: Set Expires for common file types



# ExpiresActive on



# ExpiresDefault "access plus 24 hours"



# ExpiresByType image/jpg "access plus 1 months"



# ExpiresByType image/gif "access plus 1 months"



# ExpiresByType image/jpeg "access plus 1 months"



# ExpiresByType image/png "access plus 1 months"



# ExpiresByType text/css "access plus 1 months"



# ExpiresByType text/javascript "access plus 1 months"



# ExpiresByType application/javascript "access plus 1 months"



# AddType image/x-icon .ico



# ExpiresByType image/x-icon "access plus 1 months"



# EOF: Set Expires for common file types




You just need to uncomment it OR copy it across from .htaccess.new to your own .htaccess file.

Regards.

niallb
04-20-2012, 10:23 AM
PGM, has this been added to v2.5.1? The site is running on RC1 and I havent been able to find this there, so I guess its a later addition.
Niall

pgmarshall
04-20-2012, 10:40 AM
Yep - but you can just copy and paste it in.

Regards.

niallb
04-20-2012, 01:11 PM
Hi again PGM.
Copy & pasted it , leaving the first and last #.
According to GTMetrix my leverage browser caching score has improved from 0 to 97 (The average is 87)
Thanks:D

niallb
04-20-2012, 01:20 PM
The main issue now slowing down my page load is that some images (breadcrumb, infobox top header and infobox top centre ) are taking 18 seconds to load. Is there any way I can speed this up?

pgmarshall
04-20-2012, 11:42 PM
You could make them into a sprite. 9 Free Online CSS Sprite Generator (http://www.shoutmeloud.com/9-great-free-online-css-sprite-generator.html)

Regards.

ridexbuilder
04-21-2012, 04:50 AM
PGM: the alternative Google.

niallb
04-22-2012, 12:14 AM
You could make them into a sprite. 9 Free Online CSS Sprite Generator (http://www.shoutmeloud.com/9-great-free-online-css-sprite-generator.html).

Am I right thinking that this wouldnt work on infoboxes as they are not always in the same place depending which webpage you are on as sprites need to be in 1 fixed position?
What I dont get is why on this site only it is taking so long to upload these images.

pgmarshall
04-22-2012, 11:09 AM
No - it would work on infoboxes ... but you would have to alter your template to do it. I don't think it is worth the effort really. Better to look at why they are loading slowly ..

No idea why it is taking so long to load the images ... try asking your host.

Regards.

niallb
04-23-2012, 05:05 AM
Just tried changing templates to see what difference it makes.
Fallback was the same speed as my own template, 18 secs to load
Compromise was only 8 seconds.
Think I'll have to play around with changing the images that are slow loading (breadcrumb & infobox images) to see if I can get any improvement there

michael_s
04-23-2012, 09:32 AM
That is insanely long. I have never had any problems getting images to load like that. Do you have a link?

pgmarshall
04-23-2012, 10:40 AM
niallb,

If this is on your essex handles site (http://essexhandles.co.uk/catalog/) ... I get them in 335ms which is pretty standard ... and no where near 18 seconds!

Regards.

niallb
04-24-2012, 12:16 AM
niallb,

If this is on your essex handles site (http://essexhandles.co.uk/catalog/) ... I get them in 335ms which is pretty standard ... and no where near 18 seconds!
Hi,
no its not on essexhandles, its on bestbears.co.uk.
Ive just switched back to my own template (which is virtually Fallback) and it took 19.54secs to load, Compromise took about 8 secs.
Using GTMetrix (Latest Performance Report for: http://bestbears.co.uk/ (http://gtmetrix.com/reports/bestbears.co.uk/sP939Gld) | GTmetrix see 'Timeline') reporting the slowest parts to load are the breadcrumb and infobox images
Niall

niallb
04-24-2012, 12:18 AM
That is insanely long. I have never had any problems getting images to load like that. Do you have a link?
Best Bears-Steiff & Merrythought teddy bears, London Olympic souvenirs, meerkats,animals : (http://www.bestbears.co.uk)

niallb
04-24-2012, 07:14 AM
++ UPDATE ++
Ive changed my CSS so that instead of calling for breadcrumb_background, top_left & top_right as images it picks them up as defined colours. Done the same with infobox
Result, reduced pageload time by 50%:D

pgmarshall
04-24-2012, 08:59 AM
If you wanted you could make a new box.tpl.php file to remove the corner code completely ... or even use border-radius to make them look pretty on modern browsers (CSS3).

Also, you may want to consider changing the "Tab 1" to something like "More Info" or similar in your store. Look in catalog/includes/languages/english/product_info.php.

Lastly, since you only have english language you might as well disable the language infobox.

Regards.

michael_s
04-24-2012, 10:13 AM
Not sure what your trouble is here, because when I visit your page it loads most elements in under 700ms for me. The whole page renders very quickly and no images take more than 400-500 ms to render. The slowest are your 404 pixel_trans.gif... you may want to fix that missing image.

I know you have made some changes to speed things up, but total load time for me is about 1.3 seconds. The goal should be to get the page rendered in at most 1 second, but 1.3 seconds is not bad at all.

niallb
04-24-2012, 12:52 PM
Some of the images which are not always called up for the home page still have long load times but as they are not used every time I can probably live with that. e.g.
icon.gif 30seconds
wishlist/png 21 secs
pixel_trans.gif 21 secs
pointer_blue.gif 21 secs

pgmarshall
04-24-2012, 01:43 PM
There is absolutely no way that any image (especially these tiny images) should take 30 seconds to load!

NO WAY! Even over a 56Kb modem you should achieve 7kilobytes per second ... ie. 210Kb image should load!

Regards.

niallb
04-25-2012, 05:22 AM
There is absolutely no way that any image (especially these tiny images) should take 30 seconds to load!

NO WAY! Even over a 56Kb modem you should achieve 7kilobytes per second ... ie. 210Kb image should load!

Regards.

Check it out for yourself. I use GTMetrix.com which I have found really useful.
Just type in the url and look at the timeline to see individual image loading times. You may have to try 6 or 7 times before the slower images get called up, most of the time now it takes just over 1 second but if a slow image gets called it can be much longer.
Niall