cache-blocking slow on templates associated with $module_result.content

Author Message

Luke Barton

Wednesday 30 March 2005 9:42:59 am

I've read a lot about caching on the ez.no site: documentation, articles, references, forum and the book I purchased.

I've enabled everything I know how in the site.ini.append.php file ("cac" is the name of the site):

[ContentSettings]
ViewCaching=enabled
PreViewCache=disabled
PreCacheSiteaccessArray[]=cac
PreCacheSiteaccessArray[]=plain
PreCacheSiteaccessArray[]=admin
TranslationList=

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

However, when I incorporate cache blocking for content display templates, the site is very slow -- it takes over 60 seconds to render a page that's only a few kb.

But, if I click on a page that has no template associated with the content class, all page elements render at a decent speed (<7 seconds): page_layout.tpl, page_head.tpl, menu/flat_left.tpl. (Of course, no content renders.)

Basic setup in page_layout.tpl:

{cache-block keys=$uri_string}
...
{include uri="design:page_head.tpl"}
...
{cache-block keys=$module_result.node_id}
{include uri="design:menu/flat_left.tpl"}
{$module_result.content}
{/cache-block}
...
{/cache-block}

The override.ini.append.php file specifies the content display templates for each class of content that the $module_result.content returns. For example:

[cac_content_block]
Source=node/view/full.tpl
MatchFile=cac_content_block_050328.tpl
Subdir=templates
Match[class_identifier]=cac_content_block

The site is very incomplete, but you can see 2 sample pages here: (the first has no content template, the second does):

http://216.218.247.144/index.php/cac_www/about_us

http://216.218.247.144/index.php/cac_www/your_commute

I also ran the file bin/php/eztc.php from secure shell, but I got error messages. I've contacted our host, Firebright, about that and my caching problems.

Thanks in advance for your help.

Luke Barton

Wednesday 30 March 2005 12:51:34 pm

Problem solved: the var->...->cache subdirectory did not have the correct permissions.

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 19 2025 03:30:19
Script start
Timing: Jan 19 2025 03:30:19
Module start 'layout'
Timing: Jan 19 2025 03:30:19
Module start 'content'
Timing: Jan 19 2025 03:30:20
Module end 'content'
Timing: Jan 19 2025 03:30:20
Script end

Main resources:

Total runtime1.0828 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0068 589.6328152.6875
Module start 'layout' 0.00680.0031 742.320339.5234
Module start 'content' 0.00991.0715 781.8438435.4922
Module end 'content' 1.08140.0014 1,217.33598.0781
Script end 1.0828  1,225.4141 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.3296160.0002
Check MTime0.00140.1281160.0001
Mysql Total
Database connection0.00090.080210.0009
Mysqli_queries1.032395.3383520.0199
Looping result0.00060.0516500.0000
Template Total1.041596.220.5207
Template load0.00240.223020.0012
Template processing1.039095.957720.5195
Template load and register function0.00020.020410.0002
states
state_id_array0.00170.159310.0017
state_identifier_array0.00130.116120.0006
Override
Cache load0.00210.1916450.0000
Sytem overhead
Fetch class attribute can translate value0.00070.066110.0007
Fetch class attribute name0.00170.157420.0009
XML
Image XML parsing0.00010.012010.0001
class_abstraction
Instantiating content class attribute0.00000.000720.0000
General
dbfile0.00090.0808100.0001
String conversion0.00000.000740.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/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
4content/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: 14
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs