| 
                                                                                                                         André R.
                                                                                                                             
                                                                                                                            
                                                            
                                                            
                                                                                                                          							                                                                      							                                                                                                                                
                                                                                                                                                                                    
                                                         | 
                                                        
                                                             Tuesday 29 November 2005 2:03:39 am 
                                                            
                                                            
                                                                 I know, but the pagelayout does not have anny fetches outside of cache blocks.         
{cache-block keys=$uri_string expiry=920  ignore_content_expiry}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <link rel="stylesheet" type="text/css" href={"stylesheets/core.css"|ezdesign} />
  <link rel="stylesheet" type="text/css" href={"stylesheets/debug.css"|ezdesign} />
  <link rel="stylesheet" type="text/css" href={"stylesheets/map2.css"|ezdesign} media="all" />
  <link rel="stylesheet" type="text/css" href={"stylesheets/print2.css"|ezdesign} media="print" />
  {include uri='design:page_head.tpl' enable_link=false()}
  <script language="JavaScript" type="text/javascript" src={"javascripts/script.js"|ezdesign}></script>
</head>
<body onload="loadpage();">
<div id="map-body">
<div id="map-nav">
<table>
<tr>
{if gt($module_result.path, 2)}
{def $folderList = fetch('content','list', hash(
	'parent_node_id', 2,
	'class_filter_type',  'include',
	'class_filter_array', array( 'folder'),
	sort_by, $node.path.1.sort_array
	))}
	{foreach $folderList as $folder}
	{if eq( $module_result.path.1.node_id, $folder.node_id)}
	<td><a href={$folder.url_alias|ezurl} id="nav_selected">{$folder.name}</a></td>
	{else}
	<td><a href={$folder.url_alias|ezurl}>{$folder.name}</a></td>
	{/if}
	{/foreach}
{undef $folderList}
{else}
{def $folderList = fetch('content','list', hash(
	'parent_node_id', 2,
	'class_filter_type',  'include',
	'class_filter_array', array( 'folder'),
	sort_by, $node.sort_array
	))}
	{foreach $folderList as $folder}
	{if eq( $node.node_id, $folder.node_id)}
	<td><a href={$folder.url_alias|ezurl} id="nav_selected">{$folder.name}</a></td>
	{else}
	<td><a href={$folder.url_alias|ezurl}>{$folder.name}</a></td>
	{/if}
	{/foreach}
{undef $folderList}
{/if}
</tr>
</table>
</div>
<div id="map-nav2">
{if gt($module_result.path, 1)}
{def $folderList = fetch('content','list',hash(
	'parent_node_id', $module_result.path.1.node_id,
	'class_filter_type',  'include',
	'class_filter_array', array( 'folder')
))}
{foreach $folderList as $folder}
{if eq($module_result.path.2.node_id, $folder.node_id)}
<a href={$folder.url_alias|ezurl} id="nav2_selected">{$folder.name}</a>
	{def $folderList2 = fetch('content','list',hash(
		'parent_node_id', $folder.node_id,
		'class_filter_type',  'include'
		))}
		{if gt($folderList2|count,0)}
		<ul>
		{foreach $folderList2 as $folder2}
		{if eq($node.node_id, $folder2.node_id)}
		<li><a href={$folder2.url_alias|ezurl} class="map_nav3" id="nav3_selected">{$folder2.navn}</a></li>
		{else}
		<li><a href={$folder2.url_alias|ezurl} class="map_nav3">{$folder2.navn}</a></li>
		{/if}
		{/foreach}
		{/if}
		</ul>
	{undef $folderList2}
{else}
<a href={$folder.url_alias|ezurl}>{$folder.name}</a>
{/if}
{/foreach}
{undef $folderList}
{/if}
</div>
{/cache-block}
<div id="map-content">
{$module_result.content}
</div>
<!--DEBUG_REPORT-->
</div>
</body>
</html>
                                                                
                                                                                                                            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
                                                                 
                                                                                                                                                                                 | 
                                                    
                                                                                                    
                                                        | 
                                                                                                                         steve walker
                                                                                                                             
                                                            
                                                            
                                                                                                                          							                                                                      							                                                                                                                                
                                                                                                                                                                                    
                                                         | 
                                                        
                                                             Tuesday 29 November 2005 5:09:48 am 
                                                            
                                                            
                                                                 Kare, I have changed the pagelayout to using the page I described above, just two static links, nothing else:         
Notice: eZMySQLDB::query(1 rows, 0.605 ms) query number per page:0  	Nov 29 2005 13:07:50
SELECT data, user_id, expiration_time FROM ezsession WHERE session_key='30d41969af7d30e8eed6326231320b8e'
Notice: eZMySQLDB::query(0 rows, 0.585 ms) query number per page:1 	Nov 29 2005 13:07:50
SELECT contentobject_id, login, email, password_hash, password_hash_type
FROM   ezuser
WHERE  contentobject_id='0'
Notice: eZMySQLDB::query(0 rows, 0.578 ms) query number per page:2 	Nov 29 2005 13:07:50
SELECT contentobject_id, login, email, password_hash, password_hash_type
FROM   ezuser
WHERE  contentobject_id='0'
Notice: eZMySQLDB::query(0 rows, 0.700 ms) query number per page:3 	Nov 29 2005 13:07:50
SELECT destination_url, forward_to_id
FROM ezurlalias
WHERE source_md5 = '2b7c4514a564d4f3d439d838bf1f83ff' AND
      is_wildcard = 0
ORDER BY forward_to_id ASC, is_internal ASC
LIMIT 0, 1
Timing: 	Nov 29 2005 13:07:50
Module start 'content'
Notice: eZMySQLDB::query(0 rows, 0.685 ms) query number per page:4 	Nov 29 2005 13:07:50
SELECT id, main, memento_key, main_key, memento_data
FROM   ezoperation_memento
WHERE  memento_key='6ceeb025a17151c678afb101d4310ca6' AND main='1'
Notice: eZMySQLDB::query(0 rows, 0.542 ms) query number per page:5 	Nov 29 2005 13:07:50
SELECT id, main, memento_key, main_key, memento_data
FROM   ezoperation_memento
WHERE  memento_key='6ceeb025a17151c678afb101d4310ca6' AND main='0'
Notice: eZMySQLDB::query(0 rows, 0.565 ms) query number per page:6 	Nov 29 2005 13:07:50
SELECT id, module_name, function_name, connect_type, workflow_id, name
FROM   eztrigger
WHERE  name='pre_read' AND module_name='content' AND function_name='read'
Notice: eZMySQLDB::query(1 rows, 0.948 ms) query number per page:7 	Nov 29 2005 13:07:50
SELECT ezcontentobject.*,
                       ezcontentobject_tree.*,
                       ezcontentclass.name as class_name,
                       ezcontentclass.identifier as class_identifier
                       , ezcontentobject_name.name as name,  ezcontentobject_name.real_translation 
                FROM ezcontentobject_tree,
                     ezcontentobject,
                     ezcontentclass
                     , ezcontentobject_name 
                WHERE node_id IN ( 2 ) AND
                      ezcontentobject_tree.contentobject_id=ezcontentobject.id AND
                      ezcontentclass.version=0  AND
                      ezcontentclass.id = ezcontentobject.contentclass_id
                       and  ezcontentobject_tree.contentobject_id = ezcontentobject_name.contentobject_id and
                                  ezcontentobject_tree.contentobject_version = ezcontentobject_name.content_version and
                                  ezcontentobject_name.content_translation = 'eng-GB'
Notice: eZMySQLDB::query(0 rows, 0.520 ms) query number per page:7 	Nov 29 2005 13:07:50
SELECT limit_value
                                          FROM ezuser_role
                                          WHERE contentobject_id = 617
Timing: 	Nov 29 2005 13:07:50
Module end 'content'
Timing: 	Nov 29 2005 13:07:50
End
Timing points:
Checkpoint	Elapsed	Rel. Elapsed	Memory	Rel. Memory
Module start 'content'	0.0000 sec	0.0707 sec	0.0000KB	0.0000KB
Module end 'content'	0.0707 sec	0.0501 sec	0.0000KB	0.0000KB
End	0.1208 sec	 	0.0000KB	0.0000KB
Total runtime:	512.1863 sec	
Time accumulators:
 Accumulator	 Elapsed	 Percent	 Count	 Average
ini_load				
Load cache	512.0726 sec	156,962.3528%	10	51.2073 sec
Mysql Total				
Mysql_queries	1,536.0209 sec	470,826.7106%	9	170.6690 sec
Looping result	512.0002 sec	156,940.1573%	2	256.0001 sec
Template Total	0.1015 sec	31.1%	2	0.0508 sec
Template load	0.0421 sec	12.8949%	2	0.0210 sec
Template processing	512.0588 sec	156,958.1194%	2	256.0294 sec
override				
Cache load	0.0304 sec	9.3104%	2	0.0152 sec
Total script time:	0.3262 sec	
    This is after the page had been cached. 9 sql queries in total. Regards, Steve                                                             
                                                                                                                            http://www.oneworldmarket.co.uk
                                                                 
                                                                                                                                                                                 | 
                                                    
                                                                                                    
                                                        | 
                                                                                                                         steve walker
                                                                                                                             
                                                            
                                                            
                                                                                                                          							                                                                      							                                                                                                                                
                                                                                                                                                                                    
                                                         | 
                                                        
                                                             Friday 09 December 2005 10:36:09 am 
                                                            
                                                            
                                                                 Hi Paul, Thanks for your reply - AFAWK, all triggers are disabled. Using our stripped down pagelayout as above we see:         
Notice: eZMySQLDB::query(1 rows, 0.846 ms) query number per page:0  	Dec 09 2005 18:23:50
SELECT data, user_id, expiration_time FROM ezsession WHERE session_key='36380249a14e449383788a71c93da738'
Notice: eZMySQLDB::query(0 rows, 0.643 ms) query number per page:1 	Dec 09 2005 18:23:50
SELECT contentobject_id, login, email, password_hash, password_hash_type
FROM   ezuser
WHERE  contentobject_id='0'
Notice: eZMySQLDB::query(0 rows, 0.587 ms) query number per page:2 	Dec 09 2005 18:23:50
SELECT contentobject_id, login, email, password_hash, password_hash_type
FROM   ezuser
WHERE  contentobject_id='0'
Notice: eZMySQLDB::query(0 rows, 0.743 ms) query number per page:3 	Dec 09 2005 18:23:50
SELECT destination_url, forward_to_id
FROM ezurlalias
WHERE source_md5 = '2b7c4514a564d4f3d439d838bf1f83ff' AND
      is_wildcard = 0
ORDER BY forward_to_id ASC, is_internal ASC
LIMIT 0, 1
Timing: 	Dec 09 2005 18:23:50
Module start 'content'
Notice: eZMySQLDB::query(0 rows, 0.769 ms) query number per page:4 	Dec 09 2005 18:23:50
SELECT limit_value
                                          FROM ezuser_role
                                          WHERE contentobject_id = 617
Timing: 	Dec 09 2005 18:23:50
Module end 'content'
Timing: 	Dec 09 2005 18:23:50
End
Timing points:
Checkpoint	Elapsed	Rel. Elapsed	Memory	Rel. Memory
Module start 'content'	0.0000 sec	0.0464 sec	0.0000KB	0.0000KB
Module end 'content'	0.0464 sec	0.0524 sec	0.0000KB	0.0000KB
End	0.0989 sec	 	0.0000KB	0.0000KB
Total runtime:	0.1626 sec	
Time accumulators:
 Accumulator	 Elapsed	 Percent	 Count	 Average
ini_load				
Load cache	-511.9264 sec	-168,989.9800%	10	-51.1926 sec
Mysql Total				
Mysql_queries	-511.9872 sec	-169,010.0497%	5	-102.3974 sec
Looping result	0.0001 sec	0.0245%	1	0.0001 sec
Template Total	0.1017 sec	33.6%	2	0.0509 sec
Template load	0.0442 sec	14.5977%	2	0.0221 sec
Template processing	0.0569 sec	18.7682%	2	0.0284 sec
override				
Cache load	-511.9678 sec	-169,003.6559%	2	-255.9839 sec
Total script time:	0.3029 sec	
    Queries are down to 4 now which is better, and we can see that some queries need to be there as they are authenticating the user, though you can see that the same query is listed twice? The sql query time is really low here - but you can see that the template load time is still 0.1 sec which seems a lot still... If we now change pagelayout back to our normal one for this intranet website we see: - first time page loads after cache clear, 206 queries On reloading a cached page we see:         
Notice: eZMySQLDB::query(1 rows, 0.655 ms) query number per page:0  	Dec 09 2005 18:34:06
SELECT data, user_id, expiration_time FROM ezsession WHERE session_key='36380249a14e449383788a71c93da738'
Notice: eZMySQLDB::query(0 rows, 0.659 ms) query number per page:1 	Dec 09 2005 18:34:06
SELECT contentobject_id, login, email, password_hash, password_hash_type
FROM   ezuser
WHERE  contentobject_id='0'
Notice: eZMySQLDB::query(0 rows, 0.600 ms) query number per page:2 	Dec 09 2005 18:34:08
SELECT contentobject_id, login, email, password_hash, password_hash_type
FROM   ezuser
WHERE  contentobject_id='0'
Notice: eZMySQLDB::query(0 rows, 0.743 ms) query number per page:3 	Dec 09 2005 18:34:08
SELECT destination_url, forward_to_id
FROM ezurlalias
WHERE source_md5 = '2b7c4514a564d4f3d439d838bf1f83ff' AND
      is_wildcard = 0
ORDER BY forward_to_id ASC, is_internal ASC
LIMIT 0, 1
Timing: 	Dec 09 2005 18:34:08
Module start 'content'
Notice: eZMySQLDB::query(0 rows, 0.687 ms) query number per page:4 	Dec 09 2005 18:34:08
SELECT limit_value
                                          FROM ezuser_role
                                          WHERE contentobject_id = 617
Timing: 	Dec 09 2005 18:34:08
Module end 'content'
Notice: eZMySQLDB::query(1 rows, 0.767 ms) query number per page:5 	Dec 09 2005 18:34:08
SELECT id, user_id, node_id, name
FROM   ezcontentbrowsebookmark
WHERE  user_id='617'
ORDER BY id DESC
Notice: eZMySQLDB::query(1 rows, 1.029 ms) query number per page:6 	Dec 09 2005 18:34:08
SELECT ezcontentobject.*,
                       ezcontentobject_tree.*,
                       ezcontentclass.name as class_name,
                       ezcontentclass.identifier as class_identifier
                       , ezcontentobject_name.name as name,  ezcontentobject_name.real_translation 
                FROM ezcontentobject_tree,
                     ezcontentobject,
                     ezcontentclass
                     , ezcontentobject_name 
                WHERE node_id IN ( 116 ) AND
                      ezcontentobject_tree.contentobject_id=ezcontentobject.id AND
                      ezcontentclass.version=0  AND
                      ezcontentclass.id = ezcontentobject.contentclass_id
                       and  ezcontentobject_tree.contentobject_id = ezcontentobject_name.contentobject_id and
                                  ezcontentobject_tree.contentobject_version = ezcontentobject_name.content_version and
                                  ezcontentobject_name.content_translation = 'eng-GB'
Notice: eZMySQLDB::query(1 rows, 1.008 ms) query number per page:6 	Dec 09 2005 18:34:08
SELECT ezcontentobject.*,
                       ezcontentobject_tree.*,
                       ezcontentclass.name as class_name,
                       ezcontentclass.identifier as class_identifier
                       , ezcontentobject_name.name as name,  ezcontentobject_name.real_translation 
                FROM ezcontentobject_tree,
                     ezcontentobject,
                     ezcontentclass
                     , ezcontentobject_name 
                WHERE node_id IN ( 116 ) AND
                      ezcontentobject_tree.contentobject_id=ezcontentobject.id AND
                      ezcontentclass.version=0  AND
                      ezcontentclass.id = ezcontentobject.contentclass_id
                       and  ezcontentobject_tree.contentobject_id = ezcontentobject_name.contentobject_id and
                                  ezcontentobject_tree.contentobject_version = ezcontentobject_name.content_version and
                                  ezcontentobject_name.content_translation = 'eng-GB'
Notice: eZMySQLDB::query(1 rows, 0.763 ms) query number per page:6 	Dec 09 2005 18:34:08
SELECT id, version, name, identifier, contentobject_name, creator_id, modifier_id,
       created, remote_id, modified, is_container
FROM   ezcontentclass
WHERE  id='1' AND version='0'
ORDER BY version ASC
LIMIT 0, 2
Notice: eZMySQLDB::query(1 rows, 0.994 ms) query number per page:7 	Dec 09 2005 18:34:08
SELECT ezcontentobject.*,
                       ezcontentobject_tree.*,
                       ezcontentclass.name as class_name,
                       ezcontentclass.identifier as class_identifier
                       , ezcontentobject_name.name as name,  ezcontentobject_name.real_translation 
                FROM ezcontentobject_tree,
                     ezcontentobject,
                     ezcontentclass
                     , ezcontentobject_name 
                WHERE node_id IN ( 116 ) AND
                      ezcontentobject_tree.contentobject_id=ezcontentobject.id AND
                      ezcontentclass.version=0  AND
                      ezcontentclass.id = ezcontentobject.contentclass_id
                       and  ezcontentobject_tree.contentobject_id = ezcontentobject_name.contentobject_id and
                                  ezcontentobject_tree.contentobject_version = ezcontentobject_name.content_version and
                                  ezcontentobject_name.content_translation = 'eng-GB'
Notice: eZMySQLDB::query(1 rows, 0.671 ms) query number per page:7 	Dec 09 2005 18:34:08
SELECT id, version, name, identifier, contentobject_name, creator_id, modifier_id,
       created, remote_id, modified, is_container
FROM   ezcontentclass
WHERE  id='1' AND version='0'
ORDER BY version ASC
LIMIT 0, 2
Notice: eZMySQLDB::query(1 rows, 1.040 ms) query number per page:8 	Dec 09 2005 18:34:08
SELECT ezcontentobject.*,
                       ezcontentobject_tree.*,
                       ezcontentclass.name as class_name,
                       ezcontentclass.identifier as class_identifier
                       , ezcontentobject_name.name as name,  ezcontentobject_name.real_translation 
                FROM ezcontentobject_tree,
                     ezcontentobject,
                     ezcontentclass
                     , ezcontentobject_name 
                WHERE node_id IN ( 116 ) AND
                      ezcontentobject_tree.contentobject_id=ezcontentobject.id AND
                      ezcontentclass.version=0  AND
                      ezcontentclass.id = ezcontentobject.contentclass_id
                       and  ezcontentobject_tree.contentobject_id = ezcontentobject_name.contentobject_id and
                                  ezcontentobject_tree.contentobject_version = ezcontentobject_name.content_version and
                                  ezcontentobject_name.content_translation = 'eng-GB'
Notice: eZMySQLDB::query(1 rows, 0.989 ms) query number per page:8 	Dec 09 2005 18:34:08
SELECT ezcontentobject.*,
                       ezcontentobject_tree.*,
                       ezcontentclass.name as class_name,
                       ezcontentclass.identifier as class_identifier
                       , ezcontentobject_name.name as name,  ezcontentobject_name.real_translation 
                FROM ezcontentobject_tree,
                     ezcontentobject,
                     ezcontentclass
                     , ezcontentobject_name 
                WHERE node_id IN ( 116 ) AND
                      ezcontentobject_tree.contentobject_id=ezcontentobject.id AND
                      ezcontentclass.version=0  AND
                      ezcontentclass.id = ezcontentobject.contentclass_id
                       and  ezcontentobject_tree.contentobject_id = ezcontentobject_name.contentobject_id and
                                  ezcontentobject_tree.contentobject_version = ezcontentobject_name.content_version and
                                  ezcontentobject_name.content_translation = 'eng-GB'
Timing: 	Dec 09 2005 18:34:08
End
Timing points:
Checkpoint	Elapsed	Rel. Elapsed	Memory	Rel. Memory
Module start 'content'	0.0000 sec	0.0452 sec	0.0000KB	0.0000KB
Module end 'content'	0.0452 sec	512.1575 sec	0.0000KB	0.0000KB
End	512.2027 sec	 	0.0000KB	0.0000KB
Total runtime:	0.2666 sec	
Time accumulators:
 Accumulator	 Elapsed	 Percent	 Count	 Average
ini_load				
Load cache	-511.9139 sec	-20,023.1195%	12	-42.6595 sec
Mysql Total				
Mysql_queries	0.0336 sec	1.3138%	13	0.0026 sec
Looping result	1,024.0007 sec	40,053.0030%	9	113.7779 sec
Template Total	0.2066 sec	8.1%	2	0.1033 sec
Template load	-511.9563 sec	-20,024.7784%	2	-255.9782 sec
Template processing	0.1623 sec	6.3467%	2	0.0811 sec
override				
Cache load	0.0317 sec	1.2414%	2	0.0159 sec
Total script time:	2.5566 sec	
    13 Queries here - we can see the bookmarks in there (which is fine as we cant cache that)... ... but again, huge time dedicated to template processing (0.2 sec) - aaargh! Any thoughts? Steve.                                                             
                                                                                                                            http://www.oneworldmarket.co.uk
                                                                 
                                                                                                                                                                                 |