Template processing!

Author Message

Thomas Larsen

Monday 26 June 2006 2:45:44 am

I have a problem with the loadtime for a eZ website. When I have a lot of content on a page the load time is up to 8 sec. When I look at the timing points is the template processing who takes the 88 % of the time. (See below)

Timing points:
Checkpoint Elapsed Rel. Elapsed Memory Rel. Memory
Script start 0.0000 sec 0.2105 sec 1,557.8047KB 1,448.3750KB
Module start 'content' 0.2105 sec 8.0262 sec 3,006.1797KB 10,227.5938KB
Module end 'content' 8.2368 sec 0.3603 sec 13,233.7734KB 310.2344KB
End 8.5971 sec 13,544.0078KB 0.3030KB
Total runtime: 8.7196 sec
Time accumulators:
Accumulator Elapsed Percent Count Average
ini_load
Load cache 0.1857 sec 2.0758% 15 0.0124 sec
Mysql Total
Mysql_queries 2.1401 sec 23.9181% 175 0.0122 sec
Looping result 0.0334 sec 0.3727% 173 0.0002 sec
TS translator
TS init 0.0908 sec 1.0150% 6 0.0151 sec
TS cache load 0.0205 sec 0.2292% 6 0.0034 sec
TS context load 0.0155 sec 0.1734% 6 0.0026 sec
Template Total 7.9082 sec 88.4% 3 2.6361 sec
Template load 0.0891 sec 0.9953% 3 0.0297 sec
Template processing 7.8176 sec 87.3707% 3 2.6059 sec
Template load and register function 0.0067 sec 0.0746% 1 0.0067 sec
override
Cache load 0.6217 sec 6.9486% 105 0.0059 sec
Sytem overhead
Fetch class attribute name 0.1291 sec 1.4430% 23 0.0056 sec
class_abstraction
Instantiating content class attribute 0.0023 sec 0.0259% 20 0.0001 sec
XML
Image XML parsing 0.2779 sec 3.1059% 14 0.0199 sec
Total script time: 8.9476 sec

When I look at the look at the list of templates I can see the same template is used several times, up to 12 times. As fare as I can see it’s not cachet so the eZ system have to get every template is used. I guess this is the main reason, besides sql-queries, where the load time is so high. I have tried to find the place where the php-codes get the templates, so I can cache it. Any one who knows where that output function(s) it?

Hop some one can help me.

Thomas

---------------------------------------------------------------------

Thomas Stage Larsen
System Developer

e : tsl@ez.no | m: +45 26 12 47 61 | eZ systems A/S | w: www.ez.no

Ɓukasz Serwatka

Monday 26 June 2006 11:06:12 pm

Make sure that your settings are following:

site.ini.append.php:
[ContentSettings]
ViewCaching=enabled
PreViewCache=enabled
 
[TemplateSettings]
TemplateCache=enabled
TemplateCompile=enabled
TemplateOptimization=enabled

Check also permissions for var directory. Use also {cache-block} for your pagelayout optimization.
http://ez.no/doc/ez_publish/technical_manual/3_8/reference/template_functions/miscellaneous/cache_block

You should reduce count of SQL queries to 2-3.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Massimiliano Bariola

Wednesday 28 June 2006 9:20:43 am

hi Lukas,

since you commented here, could you also have a look at this? I have a similar problem with 3.8.1 and can't find why. maybe you can give some help

http://ez.no/community/forum/install_configuration/3_8_10_additional_seconds_delay_on_any_page_of_my_new_site

thank you

Max

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 22:32:39
Script start
Timing: Jan 18 2025 22:32:39
Module start 'layout'
Timing: Jan 18 2025 22:32:39
Module start 'content'
Timing: Jan 18 2025 22:32:39
Module end 'content'
Timing: Jan 18 2025 22:32:39
Script end

Main resources:

Total runtime0.7241 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.0070 587.7891152.6094
Module start 'layout' 0.00700.0042 740.398439.4297
Module start 'content' 0.01110.7116 779.8281591.9766
Module end 'content' 0.72280.0012 1,371.804712.1875
Script end 0.7240  1,383.9922 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00540.7435160.0003
Check MTime0.00140.1954160.0001
Mysql Total
Database connection0.00110.158410.0011
Mysqli_queries0.658590.9367590.0112
Looping result0.00070.0912570.0000
Template Total0.692495.620.3462
Template load0.00210.288920.0010
Template processing0.690395.333420.3451
Template load and register function0.00040.060410.0004
states
state_id_array0.00070.099610.0007
state_identifier_array0.00090.128020.0005
Override
Cache load0.00190.2576520.0000
Sytem overhead
Fetch class attribute can translate value0.00120.170130.0004
Fetch class attribute name0.00280.387150.0006
XML
Image XML parsing0.00130.180530.0004
class_abstraction
Instantiating content class attribute0.00000.002250.0000
General
dbfile0.00100.1342250.0000
String conversion0.00000.001440.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 15
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs