Forums / Install & configuration / Speeding up first page access

Speeding up first page access

Author Message

Stéphane Cloutier

Thursday 04 March 2004 2:51:49 pm

When a visitor gets to my website, it takes between 10 to 20 secs for anything to happen. Once the first access has been made, the other web page content downloads fast (0,5 - 2 secs). I have Turck MMCache enables (2.4.6), Apache 1.3, PHP 4.3.4 and MySQL 4.1, RedHat 9, 32megs memory_limit for PHP...

What do I need to do to make the first access as fast as the rest.

Qupanuaq - Snow bunting

Björn [email protected]

Thursday 04 March 2004 5:21:20 pm

can you supply the debug output of the frontpage?

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Iain MacLean

Monday 15 March 2004 7:09:40 pm

Hi

I had a similar problem. These are the things I did to speed up the pages loading.

1. Put these settings in the site.ini.append file

[ContentSettings]
ViewCaching=enabled

[OverrideSettings]
Cache=enabled

[TemplateSettings]
NodeTreeCaching=disabled
TemplateCompile=enabled
ProcessCaching=enabled
TemplateCache=enabled

2. Use cache blocks in the pagelayout.tpl template. I put them around areas such as the document <head>, the navigation menu, page footer and other areas in the page where the content doesn't change much. Have a look at http://www.ez.no/ez_publish/documentation/incoming/cache_block_optimization for advice on how to do this.

3. Optimise the HTML in the templates. I used some of the tips given in Andy King's book 'Speed up your site with optimisation'. Look at http://www.websiteoptimization.com and search for it on http://www.webreference.com. I was able to reduce the page sizes by between 17% and 25% just by taking out blank lines, code indenting and unnecessary line breaks. (The pages are almost entirely text - very few images, and they don't change at all.) It can make the code a bit hard to read if you go too far with this, so find a balance between file size and readability. I still haven't done this to the stylesheet, but that's my next challenge!

There are a lot of fetches in our main welcome page as it lists most of the new material on the site, and I'm sure that slows loading down. The site can still be a bit slow in other areas, especially if I have cleared parts of the cache after modifying templates and ini files, but overall it's a lot faster than it was.

If you are able to cache parts of the main welcome page, it might make it load almost as fast as the rest of the site. The first visitor to the page will create the new cache.

Cheers

Iain