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 Dieding@xrow.de

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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 21:14:50
Script start
Timing: Jan 18 2025 21:14:50
Module start 'layout'
Timing: Jan 18 2025 21:14:50
Module start 'content'
Timing: Jan 18 2025 21:14:51
Module end 'content'
Timing: Jan 18 2025 21:14:51
Script end

Main resources:

Total runtime1.4379 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0073 588.0313152.6406
Module start 'layout' 0.00730.0042 740.671939.4766
Module start 'content' 0.01151.4248 780.1484580.7266
Module end 'content' 1.43630.0016 1,360.875012.1484
Script end 1.4379  1,373.0234 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.2744160.0002
Check MTime0.00180.1270160.0001
Mysql Total
Database connection0.00190.131810.0019
Mysqli_queries1.381596.0764590.0234
Looping result0.00060.0438570.0000
Template Total1.397997.220.6989
Template load0.00220.152120.0011
Template processing1.395797.062520.6978
Template load and register function0.00010.007810.0001
states
state_id_array0.00080.055210.0008
state_identifier_array0.00130.091720.0007
Override
Cache load0.00180.1237280.0001
Sytem overhead
Fetch class attribute can translate value0.00180.123930.0006
Fetch class attribute name0.00120.085550.0002
XML
Image XML parsing0.00110.073630.0004
class_abstraction
Instantiating content class attribute0.00000.000550.0000
General
dbfile0.00090.0630220.0000
String conversion0.00000.000840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs