Forums / General / section / if / foreach ...

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.

eZ debug

Timing: Jan 31 2025 06:26:16
Script start
Timing: Jan 31 2025 06:26:16
Module start 'content'
Timing: Jan 31 2025 06:26:16
Module end 'content'
Timing: Jan 31 2025 06:26:16
Script end

Main resources:

Total runtime0.0154 sec
Peak memory usage2,048.0000 KB
Database Queries4

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 587.8047180.8516
Module start 'content' 0.00630.0055 768.656393.8203
Module end 'content' 0.01180.0035 862.476670.7031
Script end 0.0153  933.1797 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002214.4589120.0002
Check MTime0.00106.7475120.0001
Mysql Total
Database connection0.00085.142510.0008
Mysqli_queries0.002818.019740.0007
Looping result0.00000.099320.0000
Template Total0.003220.810.0032
Template load0.00074.707910.0007
Template processing0.002515.990910.0025
Override
Cache load0.00053.436610.0005
General
dbfile0.00042.2802100.0000
String conversion0.00000.038830.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

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

Time used to render debug report: 0.0001 secs