Hi,
rewrite my test-code:
----------
<?php
function cf()
{
$u = 0;
$u = memory_get_usage();
create_function('$match',
'$constant = $match[1];' .
'return (AgaviConfig::has($constant) ?
AgaviConfig::get($constant) : "%".$constant."%");'
);
echo memory_get_usage() - $u, PHP_EOL;
}
for($i=0; $i < 20000; $i++) cf();
?>
----------
from this code, in truth,
create_function in AgaviToolkit::expandDirectives use
not 4864bytes but 1956bytes per call.
Therefore 1.1Mbytes are wasted per executing DefaultAction.
regards,
MugeSo
_______________________________________________
Agavi Dev Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/dev