Modular (and slow?) design, or non modular (and fast?)?

Author Message

Tore Skobba

Thursday 18 December 2003 10:39:56 am

Hi All

I Have a question which people with experince using and running EZ might help with. Currently I am making an design where I have lots of different templates (around 10 template are invoked for an page, add eventual X children node display templates for some pages). This in order to have modular design and code, in addition I am doing some controll statments in order to further have an modular design and templates. I belive that I could perhapes cut away half the templates and several controll statments if I wanted to have a less modular design, due to eventual lower page generation times (faster site).

So I am just wondring if people try to opt for fast solutions, or modular and maybee slower ones. My experince tells me that more templates tend to give longer page generation times, even when the templates are cached. However, I am not sure if the eventuel lower page generation time from an less modular design would be worth it. So I thought maybee someone with some experince could give some tips.

So what do you do? Optimize for speed or modular design?

I just wants some general personal comments as I have very little experince with different solutions.

Cheers
Tore

Mark Marsiglio

Sunday 21 December 2003 5:30:39 pm

I chose a modular design for my site, and as a performance test, I took one of my page layout templates and combined all of the includes into one template.

The result was that the non-modular template was approximately .1 seconds faster in processing times.

This was before I had enabled cache blocks, and it rendered in 3 seconds with modular template (about 12 different templates called) and 2.9 seconds when I combined everything into one template.

After enabling cache blocks, load times are down to .8 seconds on average.

I left it modular, as the slight performance improvement was not worth the development headache of having everything combined.

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

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 19 2025 07:04:29
Script start
Timing: Jan 19 2025 07:04:29
Module start 'layout'
Timing: Jan 19 2025 07:04:29
Module start 'content'
Timing: Jan 19 2025 07:04:29
Module end 'content'
Timing: Jan 19 2025 07:04:29
Script end

Main resources:

Total runtime0.0169 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.0065 589.2891152.6406
Module start 'layout' 0.00650.0038 741.929739.4922
Module start 'content' 0.01040.0047 781.421989.3984
Module end 'content' 0.01500.0019 870.820330.3047
Script end 0.0169  901.1250 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002514.4875140.0002
Check MTime0.00116.4495140.0001
Mysql Total
Database connection0.00105.751910.0010
Mysqli_queries0.003922.920030.0013
Looping result0.00000.124010.0000
Template Total0.00159.110.0015
Template load0.00084.652510.0008
Template processing0.00084.439710.0008
Override
Cache load0.00053.074010.0005
General
dbfile0.00021.317880.0000
String conversion0.00000.060640.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.0001 secs