section / if / foreach ...

Author Message

Nicolas OTTAVI

Tuesday 06 December 2005 1:02:57 pm

Hi,

In the documentation I read that the {section} template control structure was deprecated. It is suggested to use more common like control structures (e.g if, while; foreach,switch ...).

I think it is great. And It will probably be better in the next versions if more common operators will be used (like '==' instead of eq), but my questions is regarding the performances ? Is there a gain in using if, foreach controls instead of section one ?

Thanks for your answer,
C.

Frederik Holljen

Tuesday 06 December 2005 2:21:27 pm

It should be about the same. Although the syntax is different the functionality is about the same.

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 20 2025 00:24:36
Script start
Timing: Jan 20 2025 00:24:36
Module start 'layout'
Timing: Jan 20 2025 00:24:36
Module start 'content'
Timing: Jan 20 2025 00:24:36
Module end 'content'
Timing: Jan 20 2025 00:24:36
Script end

Main resources:

Total runtime0.0138 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0047 590.1641152.6094
Module start 'layout' 0.00470.0020 742.773439.4141
Module start 'content' 0.00670.0048 782.187589.2891
Module end 'content' 0.01150.0022 871.476630.3047
Script end 0.0137  901.7813 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002417.3311140.0002
Check MTime0.00117.8941140.0001
Mysql Total
Database connection0.00085.977710.0008
Mysqli_queries0.002014.691730.0007
Looping result0.00000.065710.0000
Template Total0.001913.610.0019
Template load0.00118.219310.0011
Template processing0.00075.368810.0007
Override
Cache load0.00085.998410.0008
General
dbfile0.00031.866380.0000
String conversion0.00000.046740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs