Commit 6b42834f by Seldaek

* Performance improvements [simplified block stack / topLevelBlock]

git-svn-id: svn://dwoo.org/dwoo/trunk@17 0598d79b-80c4-4d41-97ba-ac86fbbd088b
parent 25dd9806
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
! BC Break: $dwoo->output() and get() have been swapped internally, but it ! BC Break: $dwoo->output() and get() have been swapped internally, but it
doesn't change anything for you unless you called output(*, *, *, true) doesn't change anything for you unless you called output(*, *, *, true)
directly to emulate get(). This was done to reduce some overhead directly to emulate get(). This was done to reduce some overhead
* Performance improvements
[2008-04-09] 0.3.4 [2008-04-09] 0.3.4
......
...@@ -897,7 +897,9 @@ class Dwoo ...@@ -897,7 +897,9 @@ class Dwoo
else else
{ {
echo $tmp->process(); echo $tmp->process();
} }
unset($tmp);
} }
/** /**
......
...@@ -26,12 +26,12 @@ final class DwooPlugin_topLevelBlock extends DwooBlockPlugin ...@@ -26,12 +26,12 @@ final class DwooPlugin_topLevelBlock extends DwooBlockPlugin
public static function preProcessing(DwooCompiler $compiler, array $params, $prepend='', $append='', $type) public static function preProcessing(DwooCompiler $compiler, array $params, $prepend='', $append='', $type)
{ {
return 'ob_start(); $this->addStack("topLevelBlock");'.DwooCompiler::PHP_CLOSE; return 'ob_start(); '.DwooCompiler::PHP_CLOSE;
} }
public static function postProcessing(DwooCompiler $compiler, array $params, $prepend='', $append='') public static function postProcessing(DwooCompiler $compiler, array $params, $prepend='', $append='')
{ {
return DwooCompiler::PHP_OPEN.'$this->delStack(); return ob_get_clean();'; return DwooCompiler::PHP_OPEN.'return ob_get_clean();';
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment