Forums / Developer / Performance: Template load - what is it?

Performance: Template load - what is it?

Author Message

Piotrek Karaś

Thursday 28 February 2008 6:34:17 am

Hi,

I'd be grateful if someone experienced could take a minute and explain:

1) What is the <b>Template load</b> element in the debug information?
2) What could be the reason that two of <b>it</b> take <b>so much time</b>?

Some context information below:

Accumulator	 Elapsed	 Percent	 Count	 Average
ini_load				
Load cache	0.4236 sec	1.5866%	14	0.0303 sec
FindInputFiles	0.3311 sec	1.2402%	14	0.0236 sec
Mysql Total				
Mysql_queries	0.0107 sec	0.0402%	5	0.0021 sec
Looping result	0.0002 sec	0.0008%	5	0.0000 sec
TS translator				
TS init	0.0574 sec	0.2149%	9	0.0064 sec
TS cache load	0.0105 sec	0.0393%	9	0.0012 sec
TS context load	0.0089 sec	0.0334%	9	0.0010 sec
Template Total	25.9305 sec	97.1%	2	12.9652 sec
Template load	25.8541 sec	96.8511%	2	12.9271 sec
String conversion in template resource	0.0003 sec	0.0011%	1	0.0003 sec
Template parser: create text elements	0.0189 sec	0.0710%	1	0.0189 sec
Template parser: remove whitespace	0.0013 sec	0.0048%	1	0.0013 sec
Template parser: construct tree	0.1124 sec	0.4209%	1	0.1124 sec
Template load and register function	0.0227 sec	0.0852%	9	0.0025 sec
Template processing	0.0762 sec	0.2854%	2	0.0381 sec
override				
Cache load	0.0960 sec	0.3597%	2	0.0480 sec
General				
String conversion	0.0003 sec	0.0010%	3	0.0001 sec
dbfile	0.0010 sec	0.0036%	4	0.0002 sec
String conversion w/ mbstring	0.0002 sec	0.0009%	1	0.0002 sec
Total script time:	26.6947 sec

Thanks!!!

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

André R.

Thursday 28 February 2008 3:27:19 pm

Is this straight after a template cache clear or is template compilation disabled?

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Piotrek Karaś

Thursday 28 February 2008 3:50:50 pm

Neither ;) This is a site with an average of 200-300 queries per page (when cache has been cleared), look at the query count, it's 5, it's all cached. And the template compilation was not disabled ;)

Normally a page of that site takes 0.2s to generate on that server, today - without any changes made - it went to 20-40 seconds, and it was consistent over about 2 hours to show over 95% of resources used for this part. Then it went back to normal. I suspect something might be wrong with the server (it's a VPS), but I have no idea what to have checked by the provider ;(

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Piotrek Karaś

Wednesday 05 March 2008 5:06:22 am

Same thing is happening again... ;( Any thoughts?

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Piotrek Karaś

Wednesday 19 March 2008 12:37:54 am

And again... only now this was 130sek... this really looks bad...

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

André R.

Wednesday 19 March 2008 1:32:54 am

I'm afraid I haven't seen this before. You should report it in the issue tracker, but it would help if it is reproducible somehow of course... :/

One thing from Kristof though: Check file permission on the cache files, if they suddenly change so the web server can't read it, that might explain it.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Piotrek Karaś

Wednesday 19 March 2008 5:44:08 am

Hi André,

<i>I'm afraid I haven't seen this before. You should report it in the issue tracker, but it would help if it is reproducible somehow of course... :/</i>
Looking for some consistency myself, but this simply happens, and then some minutes later is gone...

<i>One thing from Kristof though: Check file permission on the cache files, if they suddenly change so the web server can't read it, that might explain it.</i>
Thanks. I'll give those a closer look. However - in all problems that I have experienced with permissions on different servers (can't read, can't write etc...), it has never taken that long... just like with pure PHP - file access errors take some additional time, but we're not talking minutes, right? ;)

Let you know if I discover something new...

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Xavier Dutoit

Monday 24 March 2008 11:59:36 pm

Hi,

run top on the server when it goes nuts, you might see something.

It reminds me a problem I had: the cache for the images was cleared, and it was regenerating all the images, I had enough image galleries to put the server on its knees (and I suspect it happily generates the same thumbnail several times for each request if two access simultaneously).

X+

http://www.sydesy.com

eZ debug

Timing: Jan 20 2025 17:41:44
Script start
Timing: Jan 20 2025 17:41:44
Module start 'content'
Timing: Jan 20 2025 17:41:45
Module end 'content'
Timing: Jan 20 2025 17:41:45
Script end

Main resources:

Total runtime1.6254 sec
Peak memory usage4,096.0000 KB
Database Queries211

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 587.7344180.8281
Module start 'content' 0.00651.4366 768.5625683.7813
Module end 'content' 1.44320.1821 1,452.3438349.0703
Script end 1.6253  1,801.4141 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00420.2587210.0002
Check MTime0.00140.0868210.0001
Mysql Total
Database connection0.00080.047410.0008
Mysqli_queries1.522893.69072110.0072
Looping result0.00250.15642090.0000
Template Total1.598198.320.7990
Template load0.00210.129420.0011
Template processing1.596098.189420.7980
Template load and register function0.00010.005910.0001
states
state_id_array0.00070.043310.0007
state_identifier_array0.00150.089220.0007
Override
Cache load0.00180.1108420.0000
Sytem overhead
Fetch class attribute can translate value0.00150.089740.0004
Fetch class attribute name0.00090.0558110.0001
XML
Image XML parsing0.00170.105940.0004
class_abstraction
Instantiating content class attribute0.00000.0019160.0000
General
dbfile0.00890.5455410.0002
String conversion0.00000.000430.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
8content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
12content/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
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 34
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs