About memory_limit

Author Message

Pascal France

Tuesday 17 January 2006 6:27:36 am

Hi,

I met a PHP developper who don't anderstand (in fact, he can't believe) why eZP need such a bit size of memory (64Mo in official documentation).

As I'm not a developper I didn't what to answer.

Could you tell me the reason about this big memory_limit value ?

I'm very concerned because I have to choice between professional shared or dedicated host.

Is this solution:

ini_set( "memory_limit", "-1M");

to the begining of index.php a good solution if I can't access php.ini ?

Regards

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Frederik Holljen

Tuesday 17 January 2006 6:51:00 am

There are two things that currently push the maximum memory used by eZ publish currently. None of them occur frequently in production usage:
1. Template compilation. When a template is changed it is compiled into php code. The compilation process currently needs to hold all templates (also included ones, a recursive process) in memory. In eZ components we we only compile one template at the time regardless of any includes. This reduces memory usage.
2. The conversion of language XML files into more convenient and cacheable php files. Similarly to 1. the current converter needs to have all of the XML file in memory. The language files have become quite large over time which means that a lot of memory is used. This issue is addressed in eZ components.

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 31 2025 00:37:47
Script start
Timing: Jan 31 2025 00:37:47
Module start 'layout'
Timing: Jan 31 2025 00:37:47
Module start 'content'
Timing: Jan 31 2025 00:37:47
Module end 'content'
Timing: Jan 31 2025 00:37:47
Script end

Main resources:

Total runtime0.0253 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0046 588.0156151.1953
Module start 'layout' 0.00460.0034 739.2109220.6719
Module start 'content' 0.00800.0154 959.8828997.8984
Module end 'content' 0.02340.0019 1,957.781329.9922
Script end 0.0253  1,987.7734 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002710.8262140.0002
Check MTime0.00114.3659140.0001
Mysql Total
Database connection0.00083.043310.0008
Mysqli_queries0.00197.375330.0006
Looping result0.00000.035810.0000
Template Total0.00145.410.0014
Template load0.00114.212410.0011
Template processing0.00031.180410.0003
Override
Cache load0.00072.739310.0007
General
dbfile0.00207.759480.0002
String conversion0.00000.028240.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